How deployments work, how custom domains attach, and the DNS basics you need so a site goes live cleanly the first time.
GitHub stores your code. Vercel ships it to the internet. The seam between those two is where most why-isn't-my-site-working frustration lives.
The good news: Vercel is the friendliest deployment platform that has ever existed. Push to GitHub, get a URL. The discipline you need is small.
Vercel does one thing, brilliantly: it watches your GitHub repo and ships your code to the internet every time you push. Three pieces are worth understanding.
The single most common reason a site works locally and breaks in production is a missing environment variable. Once you internalise that, prod debugging gets short.
On your laptop, .env.local holds your local secrets. On Vercel, the project settings hold the production secrets. Vercel injects them at build and at runtime. Your code does not change between local and prod, but the env vars do.
Rule: when prod breaks but local works, your first move is to compare .env.local with the Vercel env settings. 80% of the time, that is the bug.
To put your site on yourcompany.com instead of yourcompany.vercel.app, you change two things at once.
Vercel auto-detects Next.js when the project is at the root of the repo. If your Next.js app lives in a subfolder (a monorepo, or alongside other apps), Vercel will not find it.
Fix: in project settings, set the root directory to the subfolder where your package.json lives. Two clicks. Costs less than five minutes once you know.
You need the Hello World project from Protocol 02 deployed on Vercel, and a domain you control (any registrar). If you do not own a domain yet, register one for $10 first; you will use it on every IL project from now on.
In your Vercel project, Settings > Domains > Add. Type your domain. Vercel will tell you what DNS records to create.
Open your domain registrar (GoDaddy, Namecheap, Cloudflare). Find DNS settings. Add the records Vercel showed you (usually a CNAME for www, an A record for the root).
Usually 1 to 10 minutes. Vercel auto-detects when DNS resolves and provisions an SSL certificate. The domain badge turns green.
In Settings > Environment Variables, add MY_TEST_VAR = hello. Save. Pick all three environments (Production, Preview, Development).
In Claude Code: "On the homepage, render the value of process.env.MY_TEST_VAR. Commit and push." Watch the build run.
Open yourdomain.com. See hello. Now change the env var on Vercel to hello world. Redeploy (Deployments > ... > Redeploy). Refresh. The new value is live.
Your own custom domain serving your site. An env var changed and surfaced live. The distinction between preview URLs and production locked in.
You attach your own custom domain end-to-end, DNS records and all, and watch your Hello World go from a Vercel preview URL to your real .com.