How the Internet Found My Website
Bought saadmukhtar.devtoday. Goal: get it pointing at my Vercel site. Took about 20 minutes once I understood what was actually happening. Here's how it works.
Background
DNS: the phonebook of the internet. Translates domain names (saadmukhtar.dev) to IP addresses (76.76.21.21). Every browser request starts with a DNS lookup.
A record: maps a domain directly to an IP address.
CNAME record: maps a domain to another domain. More flexible; if Vercel's IP changes, the CNAME still resolves correctly.
CNAME flattening: Cloudflare's trick for using CNAMEs on root domains (the DNS spec doesn't normally allow this).
CDN: a network of servers distributed close to users. Vercel runs one. Cloudflare runs one too.
What I did
- 1. Bought
saadmukhtar.devon Cloudflare Registrar - 2. Added the domain in Vercel (Settings → Domains → apex only)
- 3. Copied Vercel's two CNAME values
- 4. Added both in Cloudflare DNS with proxy off (grey cloud, not orange)
- 5. Waited ~15 min for DNS propagation
That's the whole thing.
Result
saadmukhtar.devis live. Apex and www both resolve. SSL handled automatically by Vercel. No extra config beyond what's above.
Deep dive: the confusing parts
Why two CNAME records? One for the apex (@), one for www. They're technically different addresses; most people treat them as the same thing but DNS doesn't. Add only the apex in Vercel; it auto-redirects www → apex with a 308.
Why proxy off? Cloudflare's orange cloud routes traffic through their network, which creates SSL conflicts with Vercel's own CDN. Grey cloud always for Vercel-hosted sites.
CNAME on a root domain? The DNS spec says only A records (IPs) are allowed on an apex; CNAMEs are for subdomains. Cloudflare works around this by resolving the CNAME chain down to an IP automatically before responding. That's CNAME flattening.
@ (apex) CNAME → 4cca535debee29c0.vercel-dns-017.com
www CNAME → 4cca535debee29c0.vercel-dns-017.com“Invalid Configuration” in Vercel? Not broken. That's Vercel waiting to confirm the DNS records exist. On Cloudflare it usually clears in 5–30 min. Refresh and it turns green.
What actually happens end-to-end:
You type saadmukhtar.dev
↓
DNS lookup → Cloudflare returns Vercel's IP
↓
Browser hits Vercel, Host: saadmukhtar.dev
↓
Vercel: I know that domain → your site loads