Lorixen.
EN

Preview deployments: review every website change before launch

Short answer: A preview deployment builds every proposed change, usually each pull request, into its own temporary copy of your website or web app at a separate URL. Designers, the business owner and testers can click through the real thing before it goes live, instead of judging screenshots or waiting for a shared staging server. Most modern hosting platforms do it automatically. Set it up with test data and test keys, keep previews out of search engines and away from the public, and make "checked on the preview" part of approving a change.

The problem with one shared staging site

Many small teams have a single staging site. Every change goes there before production. In practice:

  • Two developers' changes are on staging at once, so it is unclear which one broke something.
  • The business owner is asked to "check staging" but cannot tell which change they are looking at.
  • Staging drifts from production and from what is in the code repository.
  • Changes wait in a queue for their turn on staging.

Preview deployments solve this by giving each change its own short-lived environment.

How preview deployments work

The details vary by platform, but the pattern is the same. Vercel's documentation on environments says that, by default, it creates a preview deployment when you push a commit to a branch that is not your production branch, when you create a pull request on a connected Git provider, or when you deploy from its command-line tool without the production flag. Netlify's documentation describes Deploy Previews as letting your team preview, review and experience changes to any part of a site without publishing them to production, and says it automatically builds a Deploy Preview when you open a pull or merge request in a connected repository.

Typically the preview's link is posted on the pull request automatically, and each new commit updates it. When the pull request is merged or closed, the preview is no longer needed.

Platforms for static sites and front-end frameworks do this out of the box. For apps with a back end, container platforms and many continuous-integration services can create review environments per branch, though they take more setup.

What reviewers should do with a preview

Make previews part of how changes are approved:

  • The developer links the preview in the pull request with a short note: what changed, where to look, what to test.
  • The reviewer, whether a developer, designer or the business owner, opens the preview on desktop and phone, checks the specific change and does a quick click through key pages.
  • Approval of the pull request means "I have seen it working on the preview", not just "the code looks fine".

For content-heavy sites, this is also where copy and images get a final check.

Getting non-developers comfortable

Owners and marketers sometimes avoid pull requests because the tools look technical. Keep it simple for them: send the preview link and a one-line question by email or chat, accept their answer there, and let the developer record the approval on the pull request. A short checklist for reviewers, such as checking the changed page on a phone, testing one form and reading new text aloud, makes the review faster and more consistent.

Configure data and secrets safely

Previews run real code, so decide what they connect to:

  • Use test or staging services, not production databases and live payment keys. Hosting platforms usually let you set different environment variables for preview and production.
  • Never send real emails or texts to customers from a preview. Use a test mail service or block outbound messages.
  • Seed realistic test data so reviewers have something meaningful to click on.
  • Limit secrets available to previews built from pull requests by outside contributors, which some platforms handle differently for security reasons.

Preview URLs are often guessable or get shared. Netlify's documentation says it adds an X-Robots-Tag: noindex header to Deploy Previews, and recommends making the project private or turning on password protection to keep previews out of search indexes and restrict access. Other platforms offer similar protection, for example requiring a team login before a preview opens.

Turn on whichever protection your platform offers, especially if previews show unreleased products, prices or client work.

Costs and clean-up

Previews use build minutes and sometimes hosting resources. For back-end review environments with databases, make sure they are deleted automatically when the pull request closes, or set a maximum lifetime, so forgotten environments do not pile up on your bill.

Testing on the preview automatically

Because each preview has a URL, automated checks can run against it: end-to-end tests of key journeys, accessibility checks, performance checks and visual comparison screenshots. Results posted back to the pull request give reviewers more confidence before they click.

A worked example

Picture a hypothetical Austin landscaping company whose website and quote request form were updated by a small agency. Every change went to one staging site, and the owner regularly approved the wrong version or found surprises after launch.

The agency moved hosting to a platform with automatic previews for each pull request, added password protection for previews, set preview environment variables to use a test email inbox and a sandbox form backend, and added automated checks on the quote form against each preview. The owner now gets a link per change, checks it on his phone and approves in the pull request. Surprises after launch became rare, and changes no longer queue for staging.

FAQ

Do we still need a staging site?

Often still useful for testing integrations or final checks before a big release, but previews take most day-to-day review off it.

Can previews work for a WordPress site?

It is harder, because content lives in a database. Some managed WordPress hosts offer cloned environments, which can play a similar role.

Are preview URLs secure?

Only if protected. Treat them as public unless password or login protection is on.

If changes to your website keep surprising you after they go live, tell us how your site is deployed today.

Sources

WhatsAppBook a call