ERR_TOO_MANY_REDIRECTS: a redirect loop

The page redirects in a circle (often HTTP ↔ HTTPS).

301/302 chains, loops and HTTPS redirects.

What the error means

ERR_TOO_MANY_REDIRECTS ("This page isn't working: example.com redirected you too many times") means the address redirects to another one that redirects back, in a loop. The browser gives up after about 20 redirects. Firefox calls it "The page isn't redirecting properly".

The usual causes

  • Cloudflare "Flexible" SSL with a server that forces HTTPS. Cloudflare talks to your server over HTTP, your server redirects to HTTPS, Cloudflare asks over HTTP again… Set SSL/TLS to Full (strict).
  • www and non-www redirecting to each other: one rule sends www to the bare domain, another the other way.
  • WordPress or app URL mismatch: the site URL says http:// while the server forces https://, or the other way round.
  • A proxy that hides HTTPS: the app behind a load balancer thinks the request is HTTP and redirects. It must trust the X-Forwarded-Proto header.
  • A cookie-based redirect (login, language) that never gets its cookie.

How to fix it

  1. Run the redirect checker above: it shows every hop and marks the loop, so you see which two addresses bounce.
  2. Pick one canonical address (for example https://www.example.com) and make sure every rule points to it, in one hop.
  3. With Cloudflare, use Full (strict) and a valid certificate on the server; check it with the SSL checker.
  4. For visitors only: clear the cookies of that site, because a stale cookie can cause the loop on one browser.

Related errors

Last updated: