V Vercel

How to set up custom domain on Vercel

intermediate 8 min read Updated 2026-03-13
Quick Answer

Add your domain via Vercel Dashboard (Project > Settings > Domains) or CLI with <code>vercel domains add example.com</code>, configure DNS records at your registrar (A record 76.76.21.21 for apex, CNAME to cname.vercel-dns.com for www), verify with <code>vercel domains inspect</code>, set as primary, and wait for propagation (typically minutes). Vercel auto-provisions SSL once valid.

Prerequisites

  • A deployed Vercel project (run <code>vercel link</code> if not linked)
  • A purchased custom domain from a registrar like GoDaddy or Google Domains
  • Access to your domain registrar's DNS settings
  • Vercel CLI installed (optional, for inspect and DNS commands)
  • Basic familiarity with DNS concepts like A and CNAME records

Step-by-Step Instructions

1

Navigate to Domains settings

Log in to the Vercel Dashboard, select your project from the overview, click Settings in the left sidebar, then select Domains from the settings menu. This page lists existing domains and provides the Add button to begin setup.
Ensure your project is deployed and linked with <code>vercel link</code> if using CLI later.
2

Add your custom domain

Click the Add or Add Domain button, then enter your domain (e.g., example.com for apex or www.example.com for subdomain). Vercel may prompt to add the www subdomain for redirects (recommended). For wildcards like *.example.com, nameservers verification is required. CLI alternative:
vercel domains add example.com
3

Review required DNS records

Vercel displays the exact DNS records needed on the domain card (e.g., A record for apex, CNAME for subdomain). Use CLI for details: vercel domains ls to list, then vercel domains inspect example.com to see project-specific values like A to 76.76.21.21 or CNAME to cname.vercel-dns.com or a unique alias like d1d4fc829fe7bc7c.vercel-dns-017.com. Always use inspected values.
CLI inspect is more precise for project-specific targets.
4

Configure DNS at your registrar

Log in to your registrar (e.g., GoDaddy DNS panel) and add records: For apex (@ or example.com), Type A, Name @, Value 76.76.21.21 (confirm via inspect). For subdomain (www), Type CNAME, Name www, Value cname.vercel-dns.com (or project-specific). Delete conflicting records first. For wildcards, set Vercel nameservers like ns1.vercel-dns.com. CLI with Vercel DNS:
vercel dns add example.com '@' A 76.76.21.21
vercel dns add example.com www CNAME cname.vercel-dns-0.com
If using external DNS like Cloudflare, add records there instead of Vercel DNS commands.
5

Verify the domain configuration

Wait for DNS propagation (minutes to 72 hours, often fast). Vercel auto-verifies; check dashboard for Valid Configuration status. CLI: Re-run vercel domains inspect example.com. If domain owned by another account, add provided TXT record. Test with vercel curl / or browser.
Propagation varies; use tools like dig or WhatsMyDNS to check globally.
6

Set as primary domain

Once verified, click the three-dot menu next to the domain in Domains settings and select Set as Primary. This makes it the default for your project.
7

Configure redirects (recommended)

In Domains settings, toggle Redirect for www to non-www (or vice versa) via the domain options. Vercel automatically handles SSL certificate provisioning once valid.
Redirects improve SEO and user experience; non-www to www is common.
8

Verify SSL and test

Check SSL with CLI: vercel certs ls. Test deployment: vercel httpstat / or visit the domain in browser. Ensure no errors in dashboard.
SSL provisions automatically in minutes after valid config.

Common Issues & Troubleshooting

Domain shows 'Invalid Configuration' or fails verification

Remove conflicting DNS records (e.g., multiple A records); ensure exact values from <code>vercel domains inspect</code> are used and wait for propagation.

Subdomain CNAME not verifying

Confirm CNAME name is just the subdomain (e.g., <code>www</code>, not <code>www.example.com</code>) and value matches Vercel-provided target exactly.

Propagation taking too long (over 1 hour)

Check global propagation with dig/@8.8.8.8 or online tools; clear registrar cache if available; avoid TTL changes during setup.

Domain assigned to another project or team

Use <code>vercel domains add example.com --force</code> to reassign, or add TXT verification record if prompted.

Wildcard or nameservers not working

Set registrar nameservers to Vercel's (<code>ns1.vercel-dns.com</code>, <code>ns2.vercel-dns.com</code>) and add custom records in Vercel DNS.