Skip to content

Preview environments

A preview environment is a throwaway, fully isolated copy of your site tied to a single git branch. Push a non-default branch and managed.dev provisions one automatically, seeds it from production, and hands you a live URL. Delete the branch and it’s gone. Previews are the unit of review on managed.dev.

When you git push managed <branch> and the branch isn’t your default and isn’t routed to staging or ignore, the platform creates a preview for it.

  1. You push a branch — say feature/checkout.
  2. managed.dev builds the commit and provisions a new environment.
  3. The environment’s database and files are cloned from production.
  4. You get a live preview URL once the deploy job finishes.

Each preview is independent: its own database, its own files, its own observability. Nothing you do in a preview can reach production data. See branch routes for how the push-to-preview mapping is decided.

Previews are reachable at a stable, disposable URL built from the site, branch, and a short hash:

Preview URL pattern
https://<site>-<branch>-<hash>.preview.managed.dev

For feature/checkout on acme-store, that’s something like https://acme-store-feature-checkout-a1b2c3.preview.managed.dev. The URL is stable for the life of the branch, so it’s safe to paste into a pull request, a ticket, or an email to a client.

A pull request on GitHub with a managed.dev status check showing “preview environment ready” linked to the live acme-store-feature-checkout preview URL.
  • Code review. Reviewers click the URL in the PR and see the change running, not just a diff.
  • QA. Run a test suite or manual pass against a real environment with production-shaped data.
  • Client sign-off. Share a working URL for approval before anything touches production.
  • Promote gate. Check the preview’s traces for errors before you promote it.

Preview URLs are reachable by anyone who has the link, which is what makes them useful for sign-off. When a preview shouldn’t be public, turn on password protection for the environment — the same control available on production — so only people with the credentials can load it.

The environment settings panel for a preview environment in the dashboard, with the password-protection toggle enabled and a generated access password field.

Previews are ephemeral by design. When you delete or close the branch, managed.dev tears the environment down — database, files, and hostname all released. You can also delete a preview manually from the dashboard or via DELETE /v1/sites/{id}/environments/{id} if you want to reclaim it before the branch goes away. Production and staging are never torn down this way; only previews are ephemeral.