Skip to content

Fix "Too many redirects" (redirect loop)

ERR_TOO_MANY_REDIRECTS (or “This page isn’t working — redirected you too many times”) means the browser got stuck in a redirect loop: A sends it to B, B sends it back to A, forever. It’s almost always an HTTPS or www misconfiguration.

The classic causes

1. HTTPS redirect loop (most common). Something redirects http → https, but the app thinks it’s still on HTTP and redirects again. Typical when an app sits behind a proxy/CDN and doesn’t know the original request was HTTPS.

  • WordPress: make sure both the site URL and home URL use https://, and don’t stack a plugin’s “force HTTPS” on top of a server redirect doing the same thing.
  • Behind a CDN: set the CDN’s SSL mode to Full (not “Flexible”). Flexible mode talks HTTP to your origin while the browser uses HTTPS — a guaranteed loop. Keep SSL on the origin and use Full.
  • Apps: honor the forwarded-protocol header (X-Forwarded-Proto) so the app knows the request was HTTPS and stops re-redirecting.

2. www vs non-www fighting. One rule sends example.com → www.example.com and another sends it back. Pick one canonical host and redirect only toward it — never both directions.

3. Duplicate redirect rules. A redirect in the app and an overlapping one in server/.htaccess config. Remove the duplicate; keep a single source of truth.

How to debug it

See the chain of redirects:

Terminal window
curl -sIL https://yourdomain.com | grep -i -E 'HTTP/|location'

You’ll see it bounce between two URLs — that pair tells you exactly which two rules are fighting.

The fix, in short

  1. Decide your canonical URL (e.g. https://example.com).
  2. Redirect toward it once, from one place only.
  3. If behind a CDN, use Full SSL and keep the origin certificate.
  4. Make the app trust the forwarded-protocol header.

Running OrbixPanel? Origin SSL is real (not “flexible”), so Full-mode CDNs won’t loop. OrbixPanel.com → — the free, self-hosted, AI-powered hosting control panel.