Session 3

Add a Custom Domain to Vercel

Buy a domain name, connect it to your Vercel project, and configure DNS so your site lives at your own address instead of a Vercel subdomain. About 15 minutes.

1

Buy a domain

Go to porkbun.com and search your business name.

.com — the gold standard

This is what everyone recognizes. If your .com is available, get it. It signals you are serious and is the most trusted extension worldwide. Typical price: $9 to $12 per year.

.co, .io, .business — solid alternatives

If your .com is taken, these are the next best options. Common in the startup world. Same price range as .com.

.site or .xyz — just for testing today

If you want to learn the process without committing to a domain yet, grab a .site or .xyz for $1 to $2 per year. Perfect for a practice run. You can always buy your real .com later and point it to the same site.

  1. Search your business name and pick your extension
  2. Complete checkout
  3. Turn on auto-renew so you do not lose it accidentally

Pro Tip

Don't overthink the domain. You can always buy a better one later. The point today is to learn the process.
2

Add your domain to Vercel

  1. Go to vercel.com and open your project
  2. Click Settings then Domains
  3. Click “Add Domain”
  4. Type your domain exactly (for example: yourdomain.com)
  5. Add www.yourdomain.com as well if prompted
  6. Vercel will show you the DNS records to add. Keep this tab open.
3

Configure DNS on your registrar

Porkbun Example

You need to add two DNS records: one that points your root domain to Vercel, and one that points the www version. Both use the same fixed values for every Vercel project.

First, get to the DNS editor on Porkbun:

  1. Sign in to porkbun.com
  2. Click Account in the top menu
  3. Click Domain Management
  4. Find your domain and click DNS next to it
  5. Delete any existing records where the Host is @ or www

Then add these two records:

Record 1 of 2 — A Record

In the “Add Record” form, set Type to A, Host to @ (the @ means your root domain), TTL to 600, then copy the value below into the Answer field:

Type

A

Host / Name

@

TTL

600

Value / Answer

Copy this and paste it into the Value field

76.76.21.21

Record 2 of 2 — CNAME Record

Add a second record. Set Type to CNAME, Host to www, TTL to 600, then copy the value below:

Type

CNAME

Host / Name

www

TTL

600

Value / Answer

Copy this and paste it into the Value field

cname.vercel-dns.com

Click Save after each record.

Heads Up

These DNS values are the same for every Vercel project. If your domain already points to a live website like Wix or Squarespace, changing these records will take that site offline. Use a fresh domain for practice if you have an active site.
4

Verify it is working

  1. Go back to Vercel. It will show a green checkmark once DNS is ready.
  2. This usually takes 1 to 5 minutes. In rare cases up to 48 hours.
  3. Visit your domain. You should see your site with a padlock in the address bar.

Note

Not working after 10 minutes? Clear your browser cache or try an incognito window.