---
title: How do I set up a staging environment on Vercel?
description: Information on how to set up a staging environment on Vercel.
url: /kb/guide/set-up-a-staging-environment-on-vercel
canonical_url: "https://vercel.com/kb/guide/set-up-a-staging-environment-on-vercel"
published: 2025-11-03
last_updated: 2026-07-16
authors: Allen Hai
related:
  - /docs/deployments/custom-environments
  - /docs/cli/deploying-from-cli
  - /docs/projects/domains/add-a-domain
  - /docs/domains/working-with-domains/assign-domain-to-a-git-branch
  - /docs/projects/environment-variables/managing-environment-variables
  - /docs/platform/deployments
install_vercel_plugin: npx plugins add vercel/vercel-plugin
---
<!-- docsgraph:related -->
## Related pages

> **For AI agents:** Follow these links to understand how this page connects to the rest of the Vercel ecosystem. For the full cross-link map (inbound, outbound, prerequisites, and semantic neighbors), see the .graph.md link below.

- [Environments](https://vercel.com/docs/deployments/environments?from=related) — Environments are for developing locally, testing changes in a pre-production environment, and serving end-users in produ
- [Promoting Deployments](https://vercel.com/docs/deployments/promoting-a-deployment?from=related) — Learn how to promote deployments to production on Vercel.
- [Git Integrations](https://vercel.com/docs/git?from=related) — Vercel allows for automatic deployments on every branch push and merges onto the production branch of your GitHub, GitLa
- [Deploy from CLI](https://vercel.com/docs/projects/deploy-from-cli?from=related) — Set up and deploy a Vercel project using the CLI, from linking to production.
- [Deployments](https://vercel.com/docs/deployments?from=related) — Learn how to create and manage deployments on Vercel.
- [How to use a non-default branch for production deployments on Vercel](https://vercel.com/kb/guide/can-i-use-a-non-default-branch-for-production?from=related) — Learn how to set a non-default branch for production on Vercel. Open the Production environment, change branch tracking,
- [How can I use GitLab Pipelines with Vercel?](https://vercel.com/kb/guide/how-can-i-use-gitlab-pipelines-with-vercel?from=related) — Learn how to use GitLab Pipelines to deploy to Vercel including support for self-managed GitLab.
- [Can you deploy based on tags/releases on Vercel?](https://vercel.com/kb/guide/can-you-deploy-based-on-tags-releases-on-vercel?from=related) — Learn how to deploy based on tags/releases on Vercel.
- [How to add and manage environment variables on Vercel](https://vercel.com/kb/guide/how-to-add-vercel-environment-variables?from=related) — Add environment variables to Vercel through the dashboard, CLI, or REST API, scope them to each environment, and pull th
- [How to Deploy a Stencil app with Vercel](https://vercel.com/kb/guide/deploying-stencil-with-vercel?from=related) — Create a Stencil app and deploy it live with Vercel.

Full cross-link map for this page: [/kb/guide/set-up-a-staging-environment-on-vercel.graph.md](/kb/guide/set-up-a-staging-environment-on-vercel.graph.md)
<!-- /docsgraph:related -->


## Custom Environments

Vercel provides the option for Pro and Enterprise users to set up a custom environment that can configured through the dashboard and be used as staging. To learn more, see [Custom Environments](https://vercel.com/docs/deployments/custom-environments#creating-an-environment-through-the-vercel-dashboard).

With custom environments, you can use [branch rules](https://vercel.com/docs/deployments/custom-environments#branch-tracking) to automatically deploy your branch when the branch name matches the rule, [attach a domain](https://vercel.com/docs/deployments/custom-environments#attach-domain) to your environment, set environment variables, or [import environment variables](https://vercel.com/docs/deployments/custom-environments#import-variables-from-another-environment) from another environment.

## Staging and Promoting Production Deployments

In addition to setting up a staging environment, you can also create staged production deployments that aren't immediately assigned to your production domains. This approach allows you to verify your production build before making it live to your users.

### Creating a Staged Production Deployment

1\. Go to your project **Settings** > **Environments** > **Production** section.

2\. Disable the **Auto-assign Custom Production Domains** option under **Branch Tracking** settings.

When you push to your production branch, Vercel will create a production deployment without automatically assigning it to your domains.

### Promoting a Staged Deployment

After verification:

1\. Navigate to the **Deployments** tab and select your staged production deployment.

2\. Click the (...) menu in the top-right corner.

3\. Select **Promote to Production** and confirm.

This approach provides an additional verification step before exposing changes to users, complementing both custom environments and branch-based workflows. Staged Production Deployments can also be used with the [Vercel CLI](https://vercel.com/docs/cli/deploying-from-cli#deploying-a-staged-production-build) to support custom CI scripts.

## Alternative branch-based workflow

For Hobby users, or others who can't use custom environments, it's also possible to set up a staging workflow by setting a branch-specific domain and environment variables for your preview deployment.

### 1\. Adding a Staging Domain

To create a staging branch:

1. Go to your dashboard, and select your project. Then, select the **Settings** tab.
   
2. In the **Domains** section, [add a custom domain](https://vercel.com/docs/projects/domains/add-a-domain) to your project and configure it as appropriate.
   
3. Finally, follow the steps to [assign it to a branch](https://vercel.com/docs/domains/working-with-domains/assign-domain-to-a-git-branch).
   

> **WARNING:** When adding a domain, it is first automatically assigned to your default branch. Make sure to click the "Edit" button and assign it to the appropriate Git branch.

## Adding Environment Variables

1. Go to your dashboard, and select your project. Then, select the **Settings** tab.
   
2. In the **Environment Variables** section, [add your environment variables](https://vercel.com/docs/projects/environment-variables/managing-environment-variables#declare-an-environment-variable) to your project and configure it to your Git branch.
   

Any branch-specific variables will override other variables with the same name. This means you don't need to replicate all your existing Preview variables for each branch – you only need to add the values you wish to override.

After adding all the necessary Environment Variables for your staging environment, make sure to redeploy your latest staging [Preview Deployment](https://vercel.com/docs/platform/deployments#preview) to apply the Environment Variables.