How to Connect a Domain to Vercel

Add a custom domain to a Vercel project, set the A and CNAME records at your registrar, and let Vercel verify the domain and issue the SSL certificate.

The project is live at a .vercel.app address and you own a domain. Connecting the two takes one setting in Vercel and two DNS records at the registrar.

Add the domain to the project

In the Vercel dashboard, open the project, go to Settings, then Domains. Enter yourdomain.com and add it. Vercel offers to add www.yourdomain.com at the same time and redirect one to the other; accept that so both addresses work. The domain shows an invalid configuration status until DNS is set.

Add an A record for the apex domain

At the registrar, or wherever the domain's nameservers point, open the DNS settings and add:

  • Type: A, Name: @, Value: 76.76.21.21

@ means the bare domain. If an A record for @ already exists and points elsewhere, edit it rather than adding a second one.

Add a CNAME record for www

In the same DNS panel add:

  • Type: CNAME, Name: www, Value: cname.vercel-dns.com

Some registrars expect a trailing dot on the value; follow the format the panel's own examples use. Delete any existing www record first, since a CNAME cannot coexist with other records for the same name.

Wait for verification and SSL

Back on the Domains page, Vercel checks the records on its own and the status changes to valid once they resolve. It then issues an SSL certificate automatically; there is nothing to upload. When both yourdomain.com and www.yourdomain.com show as valid, load each in a browser and confirm the padlock.

Choose the primary domain

On the Domains page, each domain has an edit option where you set whether it redirects to another domain. Pick one of the two, apex or www, as the primary, and set the other to redirect to it with a 308 status. Search engines then see a single address for the site.

DNS can take up to an hour. Registrars and resolvers cache records. If Vercel still reports an invalid configuration after you add the records, wait and check again. Running dig yourdomain.com in a terminal shows what currently resolves; the answer should include 76.76.21.21, and dig www.yourdomain.com should show the CNAME to cname.vercel-dns.com.

More Websites how-tos