Skip to content

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.

Updated 3 December 2026Tested with
  • 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

  1. Step 1: Set the exact A and CNAME records Vercel asks for

    In your DNS provider, point the apex domain (@) with an A record to 76.76.21.21 (or the project-specific IP shown in Vercel › Settings › Domains) and www with a CNAME to cname.vercel-dns.com. Delete any leftover AAAA (IPv6) records from your previous host — stale AAAA records break Let's Encrypt validation.

  2. 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.

  3. Step 3: SSL certificate stuck on "Generating SSL Certificate"

    Check for CAA records on your apex domain. Vercel issues certificates through Let's Encrypt, so if you have CAA records you must include 0 issue "letsencrypt.org".

  4. Step 4: Redirect apex to www (or vice versa) in one place

    Add both example.com and www.example.com in 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.

Was this page helpful?

Still stuck? We answer every message ourselves. Write to us

Building with shadcn/ui and Tailwind CSS v4?

Install 188 free blocks and components with the shadcn CLI (no account), preview them in your own brand in Studio, or get all 1,570 blocks and every theme in UI Pro (€199 once).

Use it with

This page is built from UI Pro parts: the docs article block (docs-quernly) with the code, terminal, install command, steps, contents and feedback components, included in UI Pro.