vercel aliasLearn how to apply custom domain aliases to your Vercel deployments using the vercel alias CLI command.
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
vercel alias set [deployment-url] [custom-domain]
vercel alias rm [custom-domain]
vercel alias ls
These are options that only apply to the
vercel alias command.
--yes option can be used to bypass the confirmation prompt when removing an alias.
vercel alias rm [custom-domain] --yes
--limit option can be used to specify the maximum number of aliases returned when using
ls. The default value is
20 and the maximum is
vercel alias ls --limit 100
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.