How to connect a custom domain
Status: đźź© COMPLETE Last updated: 2026-06-19 Plain-English tagline: Buy
your-site.com, point it at Vercel, get HTTPS, watch the world reach you at your real name.
Goal
You have a deployed Vercel project at your-app.vercel.app. At the end of this guide, your custom domain (e.g. yoursite.com) points to the same deployment, with SSL certificates issued automatically. Both www.yoursite.com and yoursite.com work and redirect appropriately.
Prerequisites
- A deployed Vercel project
- A domain name — either already purchased or to be purchased
The fast path: buy through Vercel Domains
If you don’t yet own the domain, the easiest route by far:
- In your Vercel project: Settings → Domains.
- Click Buy and search for the domain you want.
- Purchase it. Vercel automatically wires it up — DNS is configured, SSL is issued, the domain points at your project immediately.
That’s it. No DNS to configure, no nameservers to manage, no waiting. The domain just works in ~60 seconds. You also auto-renew.
If this path is available to you, skip the rest of this guide.
The standard path: external registrar
If you already bought the domain elsewhere (Namecheap, Google Domains, Porkbun, Cloudflare, etc.):
1. Add the domain in Vercel
In your Vercel project: Settings → Domains → Add.
Enter your domain (e.g. yoursite.com). Vercel shows instructions specific to your domain. Two common configurations appear:
| Option | When to use |
|---|---|
| Vercel nameservers | Easiest. Vercel takes full control of your domain’s DNS. |
| Specific DNS records | When you want to keep DNS at your current provider (e.g. Cloudflare for protection). |
2A. Option: Use Vercel nameservers (recommended for simplicity)
Vercel shows two nameserver values like:
ns1.vercel-dns.com
ns2.vercel-dns.com
In your registrar’s dashboard:
- Find Nameservers (sometimes called “DNS Servers” or “Name Servers”).
- Replace the default nameservers with the two Vercel ones.
- Save.
Wait. Nameserver changes propagate through global DNS — anywhere from 10 minutes to 48 hours. Usually under an hour.
2B. Option: Use specific DNS records at your current provider
Vercel shows you which records to add. Typically:
For the apex domain (yoursite.com):
| Type | Name | Value |
|---|---|---|
| A | @ | 76.76.21.21 (Vercel’s IP) |
For the www subdomain (www.yoursite.com):
| Type | Name | Value |
|---|---|---|
| CNAME | www | cname.vercel-dns.com |
In your DNS provider:
- Find DNS Records.
- Add the records exactly as shown.
- Save.
Propagation: usually faster than nameserver changes — typically 5–30 minutes.
3. Verify in Vercel
Back in Vercel Settings → Domains, you’ll see your domain with a status. After DNS propagates, it goes from “Invalid Configuration” → “Valid” → “Issuing certificate” → ready (green check).
4. Choose primary domain
Vercel will configure both yoursite.com and www.yoursite.com to work. You can choose:
- Apex as primary —
yoursite.comis canonical;www.yoursite.comredirects to it - Www as primary —
www.yoursite.comis canonical;yoursite.comredirects to it (Vercel’s default; safer for tricky DNS cases)
In Vercel, mark the one you want as “Primary” — the other automatically becomes a redirect.
5. SSL certificate
Vercel automatically issues a free Let’s Encrypt SSL certificate as soon as DNS validates. No action needed on your part. The padlock appears in browsers within a few minutes of DNS propagation.
6. Test
Visit:
https://yoursite.com— should load your apphttps://www.yoursite.com— should also load (or redirect)http://yoursite.com— should redirect to httpsyour-app.vercel.app— still works (Vercel keeps the .vercel.app URL alive)
Verification
- ✅ Vercel dashboard shows “Valid Configuration” with a green check
- âś… Browser shows your site at the custom domain with a padlock
- ✅ No “Not Secure” warning
- âś… Apex and www both work (or the non-primary redirects to the primary)
- âś… HTTP redirects to HTTPS
Common failures
”Invalid Configuration”
DNS hasn’t propagated yet, OR the records are wrong. Use whatsmydns.net to check propagation from multiple locations. Verify the records you added match exactly what Vercel asked for.
”Issuing certificate” stuck for hours
DNS propagation is taking longer than usual, OR there’s a CAA record on the domain blocking Let’s Encrypt. Check for CAA records and remove or update them to allow letsencrypt.org.
Apex domain (yoursite.com) shows the right page, www shows error (or vice versa)
You added one record but not the other. Add the missing one. For most setups, you want both apex and www to work.
Site loads but shows “Not Secure”
The certificate hasn’t been issued yet. Wait 5–10 minutes after DNS validates. If it persists, check whether you have an HSTS header from a previous domain config that’s interfering.
”Your connection isn’t private” (ERR_CERT_AUTHORITY_INVALID)
Often a browser cache issue — try an incognito window. If persistent, the certificate genuinely failed to issue. Re-trigger by removing and re-adding the domain in Vercel.
Mixed-content warnings
The site is on HTTPS but loads some resources (images, scripts) over HTTP. Update those URLs to be HTTPS or protocol-relative (//example.com/...).
Domain works but is slow
Check Vercel project settings → Functions → Regions. If your functions are in iad1 (US East) but your users are in Australia, every request crosses the Pacific. Pin to a closer region in vercel.json.
Email stops working after pointing nameservers at Vercel
If you used “Vercel nameservers” option, Vercel now controls DNS — including MX records for email. You need to re-add your email provider’s MX records in Vercel’s DNS panel.
Buying a domain — quick tips
If you don’t yet own the domain:
- Price: 15/year for a normal .com. Premium TLDs (.io, .ai) are more.
- Where to buy: Vercel Domains (easiest), Cloudflare (cheapest), Namecheap (popular), Porkbun (reliable, cheap). Avoid GoDaddy (overpriced).
- WHOIS privacy: Most registrars include it free. Make sure it’s enabled — otherwise your address and phone number are public.
- Auto-renew: Always enable. Letting a domain expire by accident is painful.
- DNS hosting: Many people register at one provider but host DNS at Cloudflare (free, fast). The two are separate concerns.
What you’ve just built
A production webapp at a real domain:
- HTTPS with auto-renewing SSL certificates
- Vercel handles the certs, the CDN, the global edge routing
- Both apex and www work
- The .vercel.app URL still resolves (useful as a backup)
The Bible Quest project (stmarkbible.com) is set up exactly this way — registered via Vercel Domains in 2026, redirects to https://www.stmarkbible.com/.
See also
- Vercel 🟩 🟦
- Domains and DNS 🟥
- HTTPS 🟥
- DNS deep dive 🟥
- How-to: Deploy a Next.js app to Vercel đźź©
- Vercel gotchas 🟥