Skip to content

vercel alias

Learn how to apply custom domain aliases to your Vercel deployments.

When a new Deployment is created (regardless of whether it's created through our Git Integration, Vercel CLI, or the REST API), the platform will automatically try to apply any Custom Domains configured in the Project Settings.

Any Custom Domain that doesn't have a custom Preview Branch configured (there can only be one Production Branch and it's configured separately in the Project Settings) will be applied to Production Deployments created through any of the available sources.

Custom Domains that do have a custom Preview Branch configured, however, only get applied when using the Git Integration.

If you're not using the Git Integration, vercel alias is a great solution if you still need to apply Custom Domains based on Git branches, or other heuristics.

In general, the command allows for assigning Custom Domains to any Deployment.

Make sure to not include the HTTP protocol (e.g. https://) for the [custom-domain] parameter.

vercel alias set [deployment-url] [custom-domain]

Using the vercel alias command to assign a Custom Domain to a Deployment.

vercel alias rm [custom-domain]

Using the vercel alias command to remove a Custom Domain from a Deployment.

vercel alias ls

Using the vercel alias command to list Custom Domains that were assigned to Deployments.

These are options that only apply to the vercel alias command.

The --yes option can be used to bypass the confirmation prompt when removing an alias.

vercel alias rm [custom-domain] --yes

Using the vercel alias rm command with the --yes option.

The following global options can be passed when using the vercel alias command:

For more information on global options and their usage, refer to the options section.