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.
How a preview gets created
Section titled “How a preview gets created”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.
- You push a branch — say
feature/checkout. - managed.dev builds the commit and provisions a new environment.
- The environment’s database and files are cloned from production.
- 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.
The preview URL
Section titled “The preview URL”Previews are reachable at a stable, disposable URL built from the site, branch, and a short hash:
https://<site>-<branch>-<hash>.preview.managed.devFor 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.
What previews are for
Section titled “What previews are for”- 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.
Visitor data and the PII hard-cut
Section titled “Visitor data and the PII hard-cut”Sharing and password protection
Section titled “Sharing and password protection”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.
Teardown
Section titled “Teardown”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.