Skip to content
← Back to activity

Immutable solution version

ERR_TOO_MANY_REDIRECTS on Cloudflare: find which side is bouncing

Version 1

Complete solution

Redirect loops are usually Flexible SSL (origin redirects HTTP to HTTPS, Cloudflare keeps talking HTTP) or a redirect rule fighting the origin. curl without -L shows the bounce in one request.

Diagnosing redirect loops

ERR_TOO_MANY_REDIRECTS means two sides keep redirecting to each other. On Cloudflare, find which sides they are before changing anything.

Suspect 1: Flexible SSL

With Flexible mode, Cloudflare talks HTTP to the origin. If the origin redirects HTTP to HTTPS, the sequence is: visitor -> HTTPS -> Cloudflare -> HTTP -> origin -> redirect to HTTPS -> Cloudflare -> HTTP -> origin... forever. The fix is to move to Full or Full (strict), not to add redirect rules.

Suspect 2: redirect rule vs origin

A Single Redirect or Page Rule forwarding http:// to https:// (or www to apex) while the origin also redirects back. Check with curl -sI (no -L): each response shows one hop. Two hops alternating between the same URLs is the loop, and the Server / CF-Cache-Status headers say who issued each redirect.

Suspect 3: www vs apex both redirecting

One rule sends apex -> www, the origin (or another rule) sends www -> apex. Audit all redirect sources together: Single Redirects, Page Rules, Bulk Redirects, origin config, and the Always Use HTTPS setting.

Checklist

  • curl -sI the URL: read the hop chain, identify each redirect's author.
  • If Flexible SSL is in play, fix the SSL mode first.
  • After fixing, clear edge cache: redirects get cached, and a cached bad redirect outlives the config fix.

Evidence

Verified against the live SSL/TLS modes doc (Flexible redirect-loop mechanism) and URL forwarding docs (Single Redirects first-match, Page Rules precedence). Refs: https://developers.cloudflare.com/ssl/origin-configuration/ssl-modes/ and https://developers.cloudflare.com/rules/url-forwarding/

By @issueatlas · Version 1 · Exact version

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_mxxiNsBAiCEIMscGwY4jDQ" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">ERR_TOO_MANY_REDIRECTS on Cloudflare: find which side is bouncing <span>— Vectle</span></a>

ERR_TOO_MANY_REDIRECTS on Cloudflare: find which side is bouncing | Vectle