Skip to content

You have a project running on a default address such as your-project.vercel.app, and you have a domain of your own. Connecting the two is mostly a matter of telling Vercel which hostname you want to serve, and then telling the rest of the internet, through DNS, where that hostname lives. It sounds fiddly, but it is only a handful of records and a short checklist.

This guide walks through the whole path: what to prepare, how to add the domain to a project, which DNS records to create, how to handle the www and bare-domain pair, how to check the certificate, and what usually goes wrong. If you later move to another host, the ideas carry over, and you can compare with connecting a domain to Cloudflare Pages, connecting a domain to Netlify and connecting a domain to GitHub Pages.

What you need before you start

Gather four things first, so you do not stop halfway with half-edited records.

  1. A working deployment. Your project should already open on its default Vercel address. If the site is broken there, it will be broken on your domain too, and you will not know which side to blame.
  2. A domain you control. You should be able to sign in to wherever the domain is registered, or to wherever its DNS is hosted. If you are still choosing one, the domain registration page lists what is on offer.
  3. Access to the DNS records. Find the screen that lets you add, edit and delete records. At many registrars it is called DNS Management, Zone Editor or Advanced DNS.
  4. A list of what is already there. Open the current records and write them down or take a screenshot. If the domain already has email records (MX, SPF, DKIM) or other services attached, you must keep them. Replacing the whole zone by accident is the classic way to break company email.

It also helps to decide the canonical address now. Will visitors see example.com or www.example.com? Both can work, but one should redirect to the other so that search engines and visitors see a single consistent address.

How DNS and the platform fit together

A browser that wants example.com first asks DNS for an address. DNS answers with the records you set. If those records point at Vercel's network, the browser connects, and the request arrives with a Host header that names your domain. Vercel then looks at which project claimed that hostname and serves it. That is why two steps are needed: the DNS records route the traffic to the platform, and the project settings tell the platform which project the traffic belongs to. If either half is missing, you get an error page or the wrong site. For a plain-language refresher on the lookup, see the Cloudflare explanation of DNS and the original RFC 1034.

Step 1: Add the domain to the project

In the Vercel dashboard, open the project, then go to Settings and choose Domains. Type your domain and add it. A common pattern is to add both versions, the bare domain and the www version, and then mark one of them to redirect to the other.

Right after you add the domain, the dashboard shows the DNS records it expects. Look at the status label next to each hostname. Until your DNS changes are in place and have spread, it will usually say something like Invalid Configuration. That is normal at this point, not an error you caused.

Write down exactly what the dashboard asks for. Platforms sometimes update their recommended values, and the dashboard is always the most current source. Do not rely on an old blog post, a forum answer or even this article for the literal values. Treat any value you read elsewhere as an example of the shape, and copy the real one from your own screen.

Step 2: Choose how to manage the DNS

You have two broad options.

Option What you do Good for Watch out for
Keep DNS where it is and add records Create the A and CNAME records the dashboard shows, at your current DNS host Domains that already have email and other services You must keep the other records intact
Move DNS to the platform's nameservers Change the nameservers at the registrar to the ones the platform gives you Simple sites where the platform can manage all records Every record, including email, must be recreated in the new zone

For most owners who already have email or other services on the domain, the first option is safer, because you only touch the records that matter. The second option is tidy for a brand-new domain with nothing else attached, and it is also the route that lets the platform issue wildcard certificates, since it controls the DNS challenge itself.

Step 3: Create the records

The bare domain (apex)

The bare domain, written as example.com, is also called the apex or root. The DNS standard does not allow a CNAME record at the apex alongside the other records that must exist there (such as SOA and NS), so the usual method is an A record that points to the address the dashboard shows. Some DNS hosts offer a special flattened CNAME, often named ALIAS or ANAME, which does the same job at the apex. If your DNS host offers it and the platform recommends it, it is a fine choice. Otherwise use the A record.

In your DNS editor, create a record like this:

  • Type: A
  • Name or Host: @ (this symbol means the apex of the zone)
  • Value: the address shown in your dashboard
  • TTL: leave the default, or choose a low value while you are testing

The www subdomain

For www, the normal choice is a CNAME record. A CNAME says that one name is an alias of another, so the platform can change the underlying addresses without you editing anything.

  • Type: CNAME
  • Name or Host: www
  • Value: the target the dashboard shows
  • TTL: default

Remove conflicts

A hostname can have a CNAME or other record types, but not both at once. If www already has an A record or an old CNAME that points to an earlier host, delete or replace it. The same applies at the apex: an older A record that points to your previous host will compete with the new one, and visitors may randomly reach either server. Leave only the records that should be live.

Step 4: Wait, then verify

Once the records are saved, return to the Domains screen and use the refresh or verify button if there is one. Two kinds of delay are normal.

  • TTL. Resolvers around the world cache your old answer for as long as the previous record's TTL allowed. If the old TTL was long, some people will keep seeing the old site until it expires.
  • Propagation in general. Not every resolver refreshes at the same moment, so your phone, your laptop and a colleague in another city may disagree for a while.

You can check from a terminal without waiting for the dashboard. Run a lookup for your hostname and compare the answer with the value the dashboard asked for. If the answer is still the old one, the change has not reached that resolver yet, or it was saved at a DNS host that is not actually serving your domain. That second case is more common than people expect: a domain can be registered in one place, have its nameservers pointing to another, and have you editing records in a third place that nobody asks.

A quick way to be sure which DNS host is in charge is to look up the NS records of the domain. The hosts named there are the only place where your edits count.

Step 5: Redirects and the canonical address

When both example.com and www.example.com work, pick one as the main address and redirect the other. In the Domains screen, edit the secondary entry and choose to redirect it to the primary. Use a permanent redirect so that search engines treat the main address as the real one.

Why this matters: two live versions of the same site can split links and confuse analytics. A single main address keeps things tidy. If you plan to rank in search, a single main address also keeps the signals for your pages in one place.

Step 6: Confirm HTTPS

After DNS is correct, the platform requests a certificate for the hostname automatically, using the same kind of process described in How It Works at Let's Encrypt. You do not upload anything. Within a short time the dashboard should show the domain as valid and the padlock should appear in the browser.

If the padlock does not appear, check these in order:

  1. DNS still points somewhere else, so the certificate request cannot prove you control the name.
  2. A CAA record exists at your DNS host that only allows a different certificate authority. Add the authority the platform uses, or remove the restrictive record if you do not need it.
  3. The www or apex record is missing, so only one of the two names got a certificate.
  4. A proxy or CDN in front of the platform is changing how the validation request arrives. Turn the proxying off while the certificate is first issued, then decide whether to switch it back on.

If you need a certificate for another service on the same domain, such as a separate application or a mail server, the SSL certificates page explains the options in general terms.

Common mistakes and how to avoid them

  • Editing the wrong DNS host. Confirm the nameservers first.
  • Deleting email records. Never clear the zone. Add or change only the records you need.
  • Typing the value with extra characters. A trailing space or a pasted protocol such as https:// in a hostname field makes the record invalid.
  • Leaving an old record. Two records for one name send traffic to two places.
  • Forgetting the www version. Visitors often type it, and a missing record shows an error.
  • Testing too soon. Give the change time, and compare with a lookup rather than refreshing the page repeatedly.
  • Mixing platforms. If the domain is also assigned to another project or account, one of them will report a conflict. Remove it from the one you no longer use.

A plain example

Suppose you own example.com and want a portfolio site on Vercel. You add example.com and www.example.com in the project's Domains screen. The dashboard shows an A record for the bare domain and a CNAME for www. At your DNS host you delete the old A record that pointed to a previous shared server, create the new A record at @, and create the CNAME at www. You keep your existing MX and TXT records because your email depends on them.

You mark example.com as the main address and set www to redirect to it. After about twenty minutes, a lookup shows the new values. The dashboard turns green, the certificate appears, and typing either version of the address leads to https://example.com. If you run into trouble, the first things you check are the nameservers, then the exact record values, then any CAA record.

Limits and what to watch for

  • The platform's rules can change. Recommended values, plan features and domain limits are set by the platform, so check its current documentation and your own dashboard.
  • DNS is shared and cached. A mistake can take time to disappear, so make changes during a quiet period and keep the old values written down so you can roll back.
  • Email and the website are separate. Pointing the apex at a web host does not move your mailboxes. If you need a professional address, look at the business email page or at how the records are managed with your provider.
  • Renewal still matters. If the domain expires, the site stops resolving no matter how well it was configured. Keep the registrar contact details current and renew before the date.
  • Do not rely on a single person. Keep the registrar login and DNS access in a shared, secured place for your team.

Summary

Connecting a domain to Vercel takes two halves that must agree: the project must claim the hostname, and DNS must route that hostname to the platform. Add the domain in the project settings, copy the exact records the dashboard shows, use an A record for the bare domain and a CNAME for www, keep your email records, remove conflicting old ones, choose a single main address with a redirect, and let the platform issue the certificate. If something fails, check the nameservers, the record values and any CAA record before anything else.

When you are ready to pick or manage a domain for your project, the domain registration page is a good place to start.

Frequently asked questions

Do I need to buy my domain from the hosting platform?

No. You can register a domain with any registrar and point it at a Vercel project. What matters is that you can edit the DNS records, either at the registrar or at a DNS host you choose.

Should I use an A record or a CNAME record?

For the bare domain (example.com) you normally use an A record, because a CNAME is not allowed at the zone apex by the DNS standard. For a subdomain such as www you normally use a CNAME. Always copy the exact values the Vercel dashboard shows for your project.

How long does it take for the domain to work?

Often a few minutes, but it can take longer depending on the TTL of the old records and on caches. Treat a few hours as normal and a day or two as the outer limit before you start looking for a real mistake.

Why does the dashboard say Invalid Configuration?

It means Vercel cannot see the records it expects. Common causes are a typo, an old record that still points elsewhere, a missing www record, or changes made at a DNS host that is not actually serving your domain.

Will HTTPS work automatically?

Once the DNS records point at the project, the platform requests a certificate for you and renews it. A CAA record that blocks the certificate authority, or DNS that is still wrong, can stop that from happening.

About the author

Bob Kanokphon Thongdee, founder of XPASS VPN

Bob Kanokphon Thongdee

  • Founder of XPASS VPN
  • Co-founder of eSIMonline.asia
  • More than 7 years in online marketing
  • Founder of Cojourney Visa and Cojourney Travel

Start your website the right way

Register a domain, add SSL and set up business email from one place.

.com registration from $18.81 for the first year

Start with a domain

Keep reading

Website Guides

How to Connect Your Own Domain to Cloudflare Pages

Move a site from the default pages.dev address to your own domain. This guide covers the setup steps, DNS options, certificate wait and common mistakes.

10 min read

Website Guides

How to Connect Your Own Domain to Netlify

Replace the default netlify.app address with your own domain. This guide covers the two DNS routes, the records, certificate steps, redirects and fixes.

10 min read

Website Guides

How to Connect Your Own Domain to GitHub Pages

A practical walkthrough for pointing a domain you own at a GitHub Pages site, covering apex and www setups, DNS records, verification and common mistakes.

10 min read