Skip to content

Vercel domain errorVercel “ERR_TOO_MANY_REDIRECTS” with Cloudflare in front

The domain points through Cloudflare to Vercel, and the browser gives up with ERR_TOO_MANY_REDIRECTS. Vercel documents one possible cause, Cloudflare’s Flexible SSL/TLS mode, and the setting that fixes it. Here it is in Vercel’s words, with what to check if the loop continues, or hand it over at a fixed price.

Short answer

A common cause is Cloudflare’s Flexible mode: in Cloudflare’s SSL/TLS settings, change Flexible to Full (strict), which needs a valid certificate on the Vercel side. If the loop continues after that, look for app redirects, Vercel domain redirects and Cloudflare rules that send the same address back and forth.

Why the redirects loop, and the fix

  1. 01

    Cloudflare’s SSL/TLS mode is Flexible

    “The browser connects to Cloudflare over HTTPS, but Cloudflare connects to Vercel over HTTP. Vercel redirects HTTP to HTTPS, so the browser repeatedly requests the same HTTPS URL.” Vercel, Reverse Proxy Servers and Vercel

    With Flexible, Cloudflare talks to Vercel over plain HTTP. Vercel sends every HTTP request to HTTPS, Cloudflare asks over HTTP again, and the loop never ends.

  2. 02

    The fix: Full (strict) with a valid certificate

    “In Cloudflare's SSL/TLS settings, use Full (strict) with a valid certificate on the Vercel origin.” Vercel, Reverse Proxy Servers and Vercel

    Switch the SSL/TLS mode to Full (strict). Vercel notes that Full also uses HTTPS to Vercel but doesn’t validate the certificate. If Vercel hasn’t issued the certificate yet, use its certificate diagnostics before switching. Vercel says its automatic HTTP-to-HTTPS redirect can’t be disabled, so the fix is on the Cloudflare side.

  3. 03

    Redirects that point at each other

    “If the loop continues with HTTPS to the origin, inspect application redirects, domain redirects, and Cloudflare rules for conflicting destinations or schemes.” Vercel, Reverse Proxy Servers and Vercel

    If the mode is already Full (strict), something else sends the address in a circle: a redirect in the app, a www or apex redirect in Vercel’s domain settings, or a Cloudflare rule. Check that they all agree on one final address and on https.

Checked against the vendor’s docs on : Vercel docs: Reverse Proxy Servers and Vercel.

Rather hand it over?

Fixed scope, fixed price, paid upfront. The work happens in writing; no call needed.

Related: Vercel 404 on a Ready deployment · 404 on refresh: Netlify and Vercel · Vercel 413 payload too large · Vercel deployment blocked: commit author

Questions

More on this error

Should we keep Cloudflare in front of Vercel at all?

Vercel says it does not recommend placing a reverse proxy server in front of a Vercel project, because Vercel’s firewall loses visibility into the traffic. If you need one, Vercel lists prerequisites, including never caching the .well-known/vercel paths. Vercel does list Cloudflare among the providers it supports, with Cloudflare’s CF-Connecting-IP header built in and no extra configuration.

Can you fix it for me?

If one bug is the whole problem, the App Fix Ticket covers it: a written diagnosis first, then the fix. If the app has more going on, the Launch Check is a written check of the whole app. Each issue found is rated critical, high, medium or low, with where it is and how it was confirmed. No issues worth fixing, no charge. If the Launch Check finds nothing rated medium or higher, Simon refunds the full $450. You keep the report either way.

A different error?

Describe it and get a written quote

Send the error and what you were doing. You get a written scope, a fixed price and a timeline; we reply by email, usually within one business day.