Connecting Your Domain — DNS records, HTTPS, propagation
The Goal
By the end of this lesson, typing yourapp.com into any browser will load your app — with the secure padlock (HTTPS) working automatically. This is the step that turns "my project" into "my product."
There's a little waiting involved (DNS changes take time to spread), so start this when you've got a few minutes to spare and can come back later if needed.
Step 1: Add Your Domain in Vercel
- Go to
vercel.com→ your project → Settings → Domains. - Type your domain into the input field:
yourapp.com. - Click Add.
- Vercel will ask how to handle the
wwwversion. Choose Redirectwwwto root — this makesyourapp.comthe primary address and quietly forwardswww.yourapp.comto it. (This is the most common choice.) - Vercel will then show you the DNS records you need to add. Keep this screen open — you're about to copy from it.
Step 2: Set Up DNS
Vercel will show you something like this:
Type Name Value
A @ 76.76.21.21
CNAME www cname.vercel-dns.com
Two records, two jobs:
| Record | What it does |
|---|---|
| A record | Points your root domain (yourapp.com) to an IP address — Vercel's server. The @ means "the root domain itself." |
| CNAME record | Points www.yourapp.com to a Vercel address, as an alias. |
Always use the exact values Vercel shows you — IP addresses can change over time, so don't copy the ones in this example. Trust your dashboard.
You now have two ways to apply these. Pick one.
Path A: Add the Records at Your Registrar
Use this if you want to keep DNS at your registrar (for example, because you also use the domain for email). Here's how it looks on Namecheap — other registrars are very similar.
- Log into Namecheap.
- Go to Domain List → click Manage next to your domain.
- Open the Advanced DNS tab.
- Add the A record:
- Type:
A Record - Host:
@ - Value: the IP Vercel gave you (e.g.
76.76.21.21) - TTL:
Automatic
- Type:
- Add the CNAME record:
- Type:
CNAME Record - Host:
www - Value:
cname.vercel-dns.com - TTL:
Automatic
- Type:
- Delete any existing A or CNAME records that conflict — leftover records from a parked page are the most common cause of "it's not working."
- Save.
Path B: Hand DNS to Vercel's Nameservers
Simpler long-term if Vercel is the only thing using this domain. Instead of managing individual records, you delegate the whole domain to Vercel.
- In Vercel → Settings → Domains → click your domain.
- Find the Nameservers option. Vercel gives you something like:
ns1.vercel-dns.com ns2.vercel-dns.com - At Namecheap: Domain List → Manage → Nameservers → Custom DNS.
- Replace the existing nameservers with Vercel's.
- Save.
From now on, Vercel manages all your DNS and adds the correct records for you automatically.
Step 3: Wait for Propagation
When you change DNS, the update has to spread across servers worldwide. This is called propagation, and it's the part that tests your patience.
- Officially, it can take a few minutes to 48 hours.
- In practice, most registrars are done within 15–30 minutes.
Back in Vercel's domain settings, you'll see a status:
- Pending — still spreading. Grab a coffee.
- Valid Configuration ✅ — it's live.
Want to peek while you wait? Go to dnschecker.org, enter your domain, choose the record type (A or CNAME), and you'll see whether servers around the globe have caught up yet.
Step 4: HTTPS Is Automatic
Here's a thing you'd normally have to fight with — and don't.
Once your DNS is valid, Vercel automatically issues a free SSL certificate for your domain (via Let's Encrypt). That's the padlock icon in the browser. You don't have to do anything.
Visit https://yourapp.com — you should see your app, secured, padlock and all.
If HTTPS still isn't working after an hour, go to Vercel → Settings → Domains → Refresh Certificate.
Step 5: Tell Supabase About the New Domain
If your app uses Supabase auth, update its allowed URLs to your real domain — otherwise login (especially "Sign in with Google") will break on the custom domain.
- Supabase dashboard → Authentication → URL Configuration.
- Set Site URL to
https://yourapp.com. - Add
https://yourapp.com/**to Redirect URLs. - Save.
Step 6: Update Env Vars (If Needed)
Some apps store their own URL in an environment variable (certain OAuth setups do). If yours does:
- Vercel → your project → Settings → Environment Variables.
- Find any variable holding your old
.vercel.appURL. - Change it to your custom domain.
- Click Redeploy — environment variable changes only take effect after a fresh deploy.
If you're not sure whether your app has one of these, ask Claude Code:
Does my app use any environment variable that references its own URL? If so, which ones do I need to update for a custom domain?
Troubleshooting
| Symptom | Likely cause and fix |
|---|---|
DNS_PROBE_FINISHED_NXDOMAIN in the browser | Domain isn't resolving yet. Either DNS hasn't propagated (wait), or the records are wrong (recheck against Vercel). |
| Vercel says "Invalid Configuration" | Your records don't match what Vercel expects. Compare carefully — watch for stray spaces or the wrong record type. |
| Browser shows "Not Secure" | SSL certificate hasn't issued yet. Wait ~30 minutes, then use Refresh Certificate in Vercel. |
Works at yourapp.com but not www.yourapp.com | Make sure you added both records (A for root, CNAME for www) and enabled the www redirect in Vercel. |
Summary
- Add your domain in Vercel → Settings → Domains.
- Vercel hands you the DNS records — an A record and a CNAME record.
- Add them at your registrar (Path A) or delegate to Vercel's nameservers (Path B).
- Wait for propagation — usually minutes, occasionally hours.
- HTTPS is automatic — Vercel provisions the padlock for you.
- Update Supabase's Site URL and Redirect URLs to your custom domain.
- Update and redeploy if any env var references your old URL.