How do I add a custom domain to my Vercel project?

Learn how to add a custom domain to your Vercel project.
Last updated on March 14, 2023
Domains & DNS

Vercel provides all deployments with a vercel.app URL, allowing you to generate Preview Deployments that can be shared instantly for seamless collaboration.

While you can use any vercel.app domain of your choice, we recommend using a custom domain for any project in production to provide greater personalization and flexibility.

To add a custom domain to your project, navigate to the Domains section under the Settings tab for the project, enter the URL for your custom domain and click "Add". It is possible to add both apex and subdomains to your project.

Free accounts have a limit of 50 custom domains per project.

Once you have added your Custom Domain, you will need to verify the domain so it can be used with your Vercel Project. The dashboard will automatically provide further instructions required for verifying your domain.

Dependent on the type of domain added, either apex or subdomain, you will be presented with differing options. Apex domains can be verified by adding an A record with your existing DNS provider while subdomains can be verified by adding a CNAME record.

WARNING: If you are verifying your domain by changing nameservers, you will need to add any DNS records to Vercel that you wish to keep from your previous DNS provider.
Adding an apex domain and a www subdomain to a project from the dashboard.
Adding an apex domain and a www subdomain to a project from the dashboard.

When adding multiple domains to a project, you want to establish the canonical source so that search engines can optimize better for it. It is also a common practice to redirect your apex domain to the www subdomain.

You can add a redirect from one to the other by clicking on the "Edit" button for your domain card and selecting an option for the Redirect to input field.

Configuring a redirect from the apex domain to the www subdomain.
Configuring a redirect from the apex domain to the www subdomain.
  • If your domain is not verifying, make sure you do not have conflicting DNS records. For example, if you find that you have multiple A records configured for your domain. Remove all of them except for the one that is pointing to Vercel.
  • If you have added a subdomain to your project, make sure that the correct CNAME record is configured with your domain registrar. The name of the record should be the subdomain for your project and the value should be provided by the domain card in your Vercel project settings. The domain should never be part of the name field.
  • If you are getting a 404 error for either your apex or www subdomain, make sure you have added both of them to the project as Vercel does not automatically add this for you.
  • DNS changes can take a while to propagate accross the globe. This may mean that certain regions can access your site as intended, while others wait until the DNS changes have reached them. Please allow some time for these changes to take effect (usually sooner than 48 hours).

Couldn't find the guide you need?