Price your idea
← All guides

Updated November 2026 in Launch

Test every change before customers see it: previews, branches and rollbacks

How to stop shipping fixes straight to paying customers: preview links for every change, a simple branch habit, a rollback you've practised, and how this interacts with usage-based hosting.

BThe Builder Handbook team12 min read. Every price checked on the provider's own page.
A page checked under a loupe before filing
In this guide
  1. What a preview is
  2. A branch habit for one person
  3. What to check on every preview
  4. Why this matters on usage-based hosting
  5. Rollback: know the button before you need it
  6. Do you need a staging environment?
  7. A full change, start to finish
  8. Keep test data out of production
  9. Habits that lead to bad deploys
  10. Questions

The fix that broke sign-up

A customer reports a typo on the pricing page. You fix it, push, and go to bed. In the morning: three emails saying nobody can sign in. The typo fix included a change you'd forgotten about in another file, and it went straight to production.

Nothing about this is unusual. It's what happens when every change goes live the moment you push it.

When you're the only person working on a product, it's tempting to skip any process at all. You don't need much. You need three habits: look at a change before it's live, keep the live version separate from work in progress, and know how to go back.

What a preview is

A deploy preview is a full copy of your site built from a change, on its own temporary address, without touching the live site. On Netlify, opening a pull request in a connected repository builds one automatically, with an address based on the pull request number[1]. Previews are also built when an agent run changes files on your site[1].

That gives you a place to click through the change exactly as a customer would: on your phone, with real data, before it's real.

What you get beyond the link

  • Comments and screenshots directly on the preview through a collaboration drawer, useful if someone else reviews your changes[1].
  • A noindex header by default, so previews don't end up in search results[1].
  • Password protection or private visibility if a preview shouldn't be public; private project visibility is available on credit-based plans[1].

A branch habit for one person

Work on a branch, check the preview
Work on a branch, check the preview

You don't need a team process. You need one rule: the main branch is what customers see. Everything else happens on a branch.

  1. Create a branch for each change, even small ones: fix-pricing-typo.
  2. Push it and open a pull request. The preview builds.
  3. Open the preview on your phone. Click through the change and one critical path (sign-in or checkout).
  4. Merge only when the preview looks right. That merge is the production deploy.

It adds about two minutes per change. It also means a half-finished experiment never reaches a customer because you pushed the wrong thing.

What to check on every preview

Two minutes, every time

  • The change itself, on a phone-sized screen.
  • Sign-in still works.
  • Checkout or the paid area still loads.
  • No errors in the browser console on the pages you touched.
  • Anything the change could affect indirectly: shared components, styles, environment settings.
Previews and scheduled jobs: on Netlify, scheduled functions run on their schedule only for published deploys, not on previews or branch deploys[3]. To test one on a preview, trigger it manually from the dashboard.

Why this matters on usage-based hosting

On Netlify's credit-based plans, each production deploy costs 15 credits, against 300 a month on the free plan, 1,000 on Personal and from 3,000 on Pro[2]. Merging fixes one at a time in a busy week adds up quickly.

Hypothetical example

Launch week approachProduction deploysCredits on deploys alone
Push every fix straight to main20300
Check previews, batch related fixes8120

The second approach also ships fewer broken deploys, which is the bigger saving. We cover the rest of launch week's limits in Free tiers that break on launch day.

Rollback: know the button before you need it

Rolling back to the last good version
Rolling back to the last good version

Most hosts keep a history of deploys and let you republish an earlier one in a click. That's your fastest fix for "the site is broken right now": go back first, then debug calmly.

  1. Find your host's deploy history page and bookmark it.
  2. Once, on a quiet day, publish the previous deploy, check the site, then publish the latest again.
  3. Write down what a rollback doesn't undo: database changes, sent emails, charges. Those need their own plan.
Database changes are the hard part. Rolling back code doesn't roll back a database migration. Make schema changes that work with both the old and new code where you can, and take a backup before risky ones.

Do you need a staging environment?

Previews are enough when

  • You're one or two people
  • Changes are mostly front end and small functions
  • Your test data can live in a separate test project

A full change, start to finish

Hypothetical example

A customer asks for the reminder email to include the client's name. With previews, the change goes like this:

  1. Branch: create reminder-client-name. Ask your assistant for the change, review the diff.
  2. Pull request: push and open it. The preview builds on its own address.
  3. Check the preview: sign in with a test account, trigger a reminder to your own address, read it on your phone. The name shows, but one client with no name on file gets "Hi ,". Fix that on the same branch; the preview rebuilds.
  4. Critical path: sign in and open the billing page on the preview. Both still work.
  5. Merge: one production deploy, not three.
  6. After: watch errors for an hour. If anything looks wrong, roll back first, investigate second.

The bug with the missing name would have reached every customer with an incomplete client record. On the preview, it reached only you.

Keep test data out of production

Previews are only safe if they don't touch real customers. A simple split:

SettingProductionPreviews
DatabaseLive projectA separate test project with fake data
Payment keysLive keysTest keys, test cards only
Email sendingYour real sending domainA test mode, or only to your own address
Scheduled jobsRun on scheduleRun manually when needed

Most hosts let you set different environment variables for production and previews. Set them once, and every preview is automatically safe.

Habits that lead to bad deploys

  • Previews pointing at the live database. Use test data and test payment keys in preview environments.
  • Merging without opening the preview because "it's just copy".
  • Never practising a rollback, then hunting for the button during an incident.
  • Treating the AI assistant's change as reviewed because it compiled. Look at the preview; see building with an AI assistant.

Questions

Do I need Git to get previews?

For automatic previews from pull requests, yes: they come from a connected repository[1]. It's worth setting up even if you're the only developer.

Can customers stumble on a preview?

Preview addresses aren't linked anywhere, carry a noindex header, and can be password-protected or made private[1]. Don't put real secrets in them anyway.

Make your next change on a branch, open a pull request, and check the preview on your phone. Then practise one rollback this week, while nothing is on fire.

B
The Builder Handbook teamWe write guides for people building small software alone or in pairs. Every price is checked against the provider's own page. More about us

Sources

Checked 14 November 2026. Numbers in brackets in the text point to these sources.

  1. Netlify docs: Deploy Previews
  2. Netlify pricing
  3. Netlify docs: Scheduled Functions
The weekly bill

One product's real costs, every week

What it pays for, what it earns, and the cost that surprised its makers. Plus new guides when they're out.

Free. One email a week. Unsubscribe any time.