Vercel custom domain not working: DNS, Cloudflare and SSL fixes
Fix Vercel custom domain errors: A/CNAME records, stale AAAA records, Cloudflare proxy redirect loops, stuck Let’s Encrypt SSL, and CAA records.
- Vercel Domains
- Cloudflare DNS
Adding a custom domain in Vercel usually takes two minutes, unless your DNS sits behind Cloudflare's orange proxy cloud, an old AAAA record is still hanging around, or apex and www point to different hosts. Here are the four exact fixes for stuck SSL certificates and redirect loops.
Four common causes and fixes
Step 1: Set the exact A and CNAME records Vercel asks for
In your DNS provider, point the apex domain (
@) with anArecord to76.76.21.21(or the project-specific IP shown in Vercel › Settings › Domains) andwwwwith aCNAMEtocname.vercel-dns.com. Delete any leftoverAAAA(IPv6) records from your previous host — staleAAAArecords break Let's Encrypt validation.Step 2: Cloudflare proxy (orange cloud) causing ERR_TOO_MANY_REDIRECTS
If your DNS is on Cloudflare, either switch the Vercel DNS records to DNS only (grey cloud) — which Vercel recommends so its own edge network handles SSL — or set Cloudflare's SSL/TLS mode to Full (strict). Never leave Cloudflare on Flexible in front of Vercel.
Step 3: SSL certificate stuck on "Generating SSL Certificate"
Check for
CAArecords on your apex domain. Vercel issues certificates through Let's Encrypt, so if you have CAA records you must include0 issue "letsencrypt.org".Step 4: Redirect apex to www (or vice versa) in one place
Add both
example.comandwww.example.comin Vercel's Domain settings and let Vercel handle the 308 redirect from one to the other. Don't stack a Cloudflare Page Rule redirect on top of a Vercel redirect.
Questions
How long does DNS propagation actually take?
Usually 2 to 15 minutes when TTL is 300s. If Vercel still says "Invalid Configuration" after 30 minutes, run dig +short A example.com and dig +short CNAME www.example.com in your terminal to see what public resolvers return.
Considering Cloudflare Workers instead of Vercel?
See Deploy Next.js to Cloudflare Workers or Cloudflare Workers custom domain fixes.
Related articles
- DeployingCloudflare Workers custom domain not working: DNS and SSL fixesFix Cloudflare Workers custom domain errors: conflicting A/CNAME records, ERR_TOO_MANY_REDIRECTS with Flexible SSL, pending CAA validation and apex redirects.
- DeployingDeploy Next.js to Cloudflare Workers: OpenNext or vinextTwo routes, both built and dry-run deployed on Next.js 16: OpenNext for the real Next.js build, vinext for new apps on Vite. Which to pick and the gotchas.
- Using themes.devFrom website template to live site, step by stepGet the theme from GitHub or as a zip, run it locally, replace the demo content, set SITE_URL and deploy to Cloudflare, Netlify or Vercel.
Still stuck? We answer every message ourselves. Write to us