An AI tool can turn a prompt into a working app in minutes. The part nobody shows you in the demo is the last mile: getting that app off a *.vercel.app preview URL and onto yourdomain.com with a padlock next to it.
That last mile is DNS and hosting. It's not hard, but it has two or three traps that eat an afternoon — and one that quietly eats money every month. Here's the whole path, start to finish.
Step 1: The two DNS records you actually need
Every custom-domain setup comes down to two questions: what happens when someone types yourdomain.com, and what happens when they type www.yourdomain.com.
The apex (root) domain — yourdomain.com with nothing in front. DNS rules say the apex normally needs an A record (pointing at an IP), which is fragile because IPs change. Better hosts support ALIAS / ANAME or CNAME flattening, which let the apex behave like a CNAME. On Cloudflare, flattening is automatic.







