Assigning a domain to a Git branch

Every commit pushed to the Production Branch of your connected Git repository will be assigned the domains configured in your project.

To automatically assign a domain to a different branch:

  1. From the dashboard, pick the project to which you would like to assign your domain and select the Settings tab.
  2. Click on the Domains menu item.
  3. Select the Edit dropdown item for the domain to which you would like to assign your branch.
  4. Select Preview from the Connect to an environment section
  5. In the Git Branch field, enter the branch name to which you would like to assign the domain:
Assign domain to branch modal.
Assign domain to branch modal.

Pro and Enterprise teams can also set branch tracking for their custom environments.

If you prefer to do this using the Vercel REST API instead, you can use the "Update a project domain" PATCH endpoint.

Last updated on March 12, 2025