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