Delivery & Operations

Why preview and production are treated as different systems

A preview URL is not a miniature production site. It has a different audience, indexing policy, review purpose, and risk profile, so we make the environment distinction explicit in code.

A preview deployment can look almost identical to production. That visual similarity is useful. It is also easy to misunderstand. Preview and production serve different purposes. Production is the public record of the site. It is where canonical URLs point, where analytics should describe real users, where search engines should index pages, and where the business expects reliability.

Preview exists so we can be wrong safely.

A branch needs somewhere real to run

Local development catches a lot. It does not perfectly reproduce deployment behavior, environment variables, framework build output, real network requests, or the exact browser path somebody else will use during review. A preview deployment gives the branch a real URL and runs the actual application artifact.

That makes feedback more useful. A reviewer can open a phone, a tablet, or a desktop browser and test the real page instead of judging a screenshot.

Preview should be realistic without becoming public

We want the rendering, routes, styles, forms, images, and metadata generation to behave as closely to production as practical. We do not want the preview hostname indexed as another version of the site. That is why several of our projects tie robots behavior to the deployment environment.

The same codebase can produce an indexable production site and a nonindexable preview without relying on somebody to remember a manual setting every time a branch is created.

Environment variables belong to the environment

Preview and production may need different values. A production form destination may differ from a testing destination. A public site URL may differ from a preview host. A secret used by a server route should come from the deployment environment rather than the repository.

This keeps credentials out of source control and makes the release boundary explicit.

Analytics need judgment too

A preview can distort analytics if internal review traffic is treated like production behavior. On some projects, the simplest answer is to avoid attaching the production analytics behavior to nonproduction environments. On others, the integration may remain present but be filtered or separated.

The correct implementation depends on the stack. The important point is that preview traffic and customer traffic are not automatically the same dataset.

A preview can be broken in ways production is not

Branch code may contain unfinished content, experimental routes, temporary diagnostics, or new dependencies. That is acceptable within reason. The preview exists to surface those problems before merge. This is why "it deployed" is not our definition of "it is ready." A deployment can be technically successful while the mobile navigation is clipped, a canonical is wrong, or a content card points to a missing route.

Production should be boring

A good release process moves uncertainty earlier. By the time code reaches production, the branch should already have been built, previewed, and reviewed. The production deployment should not be the first time anybody sees the final route structure. The more boring production becomes, the healthier the process usually is.

Preview links are not security controls

A hard-to-guess URL is not a private environment. If the content is confidential, use deployment protection or authentication. Robots directives only address search indexing. They do not make the page secret. This distinction matters because teams sometimes treat "not linked anywhere" as if it means "not accessible."

It does not.

Why this improves client review

A real preview shortens the distance between feedback and implementation. A client can point to the exact route and viewport where something feels wrong. They can test a form. They can see how a long title wraps. They can compare desktop and mobile.

That is better than trying to infer production behavior from a static mockup.

Why this improves our own discipline

When every feature branch can become a reviewable deployment, architecture has to tolerate incomplete work cleanly. Routes need sensible not-found behavior. Environment assumptions need to be explicit. The site cannot depend on undocumented steps performed only on one developer's machine. Previewability becomes a design constraint.

That is a good constraint. It pushes the project toward reproducible builds, environment-aware configuration, and a clearer release process.

The distinction we want

Preview answers: "Is this change ready to become real?" Production answers: "This is the version we have decided is real." Keeping those two meanings separate protects search behavior, analytics quality, review quality, and the stability of the public site.

From explanation to proof

Where this connects to the work

This category documents the work that keeps a custom site maintainable after launch and makes handoff possible without technical hostage-taking.