Custom Domains and DNS
A *.workers.dev or *.vercel.app is fine for testing, but you want your own name. The flow:
- Buy the (Namecheap, Cloudflare Registrar, Porkbun — pick one).
- Point its at your host. This usually means adding a
CNAMEorArecord, or changing the domain's nameservers entirely. - Add the domain in your host's dashboard and let it issue an SSL certificate (the digital ID card that proves the site is really yours and turns on the padlock and — the secure, encrypted version of the web's transfer protocol) automatically.
A quick mental model so the records stop feeling like magic: an A record points a name straight at an IP address; a CNAME points one name at another name (handy when the host's IP can change under you); and nameservers hand the whole domain over to a provider so it manages every record for you. Most modern hosts prefer either a CNAME or a full nameserver switch — they want to manage the SSL certificate and the routing themselves.
Here is the whole chain a visitor's request travels, and where each piece you set up lives in it:
visitor types
yourdomain.com
│
▼
┌───────────┐ "what IP is ┌──────────────┐
│ BROWSER │── yourdomain.com?" ──▶│ DNS │ ← your A / CNAME
│ │◀── here's the IP ─────┤ (registrar) │ record points here
└─────┬─────┘ └──────────────┘
│ HTTPS request to that IP
▼
┌───────────┐ ← SSL certificate proves
│ HOST │ the site is really yours
│ (CF/Vercel)│
└─────┬─────┘
│ routes to
▼
┌───────────┐
│ YOUR APP │ serves the page
└───────────┘
DNS is the single most confusing part for beginners, mostly because of jargon and propagation delays. Have the AI translate. Ask: "My domain is registered at Namecheap and I'm hosting on Cloudflare Pages. Walk me through exactly which records to add, what values, and how to verify it worked." Then verify the result yourself with a quick check rather than just refreshing the browser:
# Look up the records the world actually sees
dig yourdomain.com
nslookup yourdomain.com
# Confirm the certificate is live and not expired
curl -I https://yourdomain.com
DNS changes can take anywhere from minutes to a day to propagate, and your own browser's is the worst liar of all — it will happily show you a stale answer long after the rest of the internet has updated. If it is not live immediately, that is normal: check from your phone on cellular data, or use an online "DNS propagation" checker, before you assume something is broken.