Once the domain has been added to your project and configured, it is automatically applied to your latest production deployment.
The first deployment of a new project will be marked as production and subsequently assigned with your custom domain automatically.
When you assign a domain to a different branch, you'll need to make a new deployment to the desired branch for the domain to resolve correctly.
Reverts take effect immediately, assigning the Custom Domain to the deployment made prior to the point the revert is effective from.
You can add domain redirects from the Domains tab when more than one domain is present in the project. This provides a way to, for example, redirect a
www subdomain to an apex domain, but can be used in a variety of ways.
If a user visits your domain with or without the "www" subdomain prefix, we will attempt to redirect automatically. You might still want to add this redirect explicitly.
To add a redirect, click the Edit button on the domain you want to redirect from and use the Redirect to dropdown to select the domain you want to redirect to:
Adding an apex domain to a Project on Vercel will automatically suggest adding its
www counterpart. Using both of these domains ensures that visitors can always access your site, regardless of whether or not they use
www when entering the URL.
After clicking "Add" for a domain, you will be able to choose how to redirect the
We recommend using the
www subdomain as your primary domain, with a redirect from the non-
www domain to it. This allows the Vercel Edge Network more control over incoming traffic for improved reliability, speed, and security. The redirect is also cached on visitor's browsers for faster subsequent visits.
Some browsers like Google Chrome automatically hide the
www subdomain from the address bar, so this redirect may not affect your URL appearance.
Choosing to redirect the
www domain to the non-
www also works but provides Vercel less control over incoming traffic. Alternatively, you can choose to add only the domain you typed.
You can also add redirects programmatically using frameworks, Serverless Functions, Edge Functions, and more. Learn more.