ERR_TOO_MANY_REDIRECTS: find and fix a redirect loop
How to see the loop, and the usual culprits: Cloudflare Flexible SSL, layers that disagree on www or HTTPS, WordPress URLs and cookie loops.
· 4 min read · By the Spot Downtime team
ERR_TOO_MANY_REDIRECTS (“example.com redirected you too many times”) means the browser followed redirect after redirect and gave up, usually after about 20. Almost always, it's a loop: page A sends you to page B, and page B sends you back to A. Two pieces of configuration are disagreeing about what the “right” address is.
See the loop first
Don't guess. Follow the redirects and look at where each one points:
curl -sIL https://example.com --max-redirs 10 | grep -iE '^(HTTP|location)'The pattern of the loop usually names the cause right away.
Common causes
Cloudflare Flexible SSL plus an HTTPS redirect
The classic. Cloudflare's Flexible mode connects to your server over plain HTTP. Your server sees HTTP and redirects to HTTPS. Cloudflare passes that redirect to the browser, which asks for HTTPS again, which Cloudflare sends to your server over HTTP… forever.
Fix: install a certificate on your server (a free Cloudflare Origin CA certificate works) and switch the SSL mode to Full (strict).
Two layers redirecting in opposite directions
- The CDN redirects
www→ bare domain, and the server redirects bare domain →www. - The app adds a trailing slash, and a proxy rule removes it.
- A load balancer terminates HTTPS and the app, seeing HTTP, redirects to HTTPS again.
Pick one canonical address and enforce it in exactly one place. Behind a load balancer, have the app trust the X-Forwarded-Proto header so it knows the visitor is already on HTTPS.
WordPress site URL settings
WordPress redirects to whatever is in WordPress Address and Site Address. If those say http:// while the server forces https://, or disagree on www, you get a loop. Fix them in wp-config.php if you can't reach the admin:
define('WP_HOME', 'https://example.com');
define('WP_SITEURL', 'https://example.com');Login and cookie loops
A page sends you to log in, and the login page sends you back because the session cookie wasn't saved (wrong domain, Secure cookie over HTTP, or blocked by the browser). Clearing the site's cookies helps visitors; fixing the cookie settings fixes it for everyone.
For visitors
Loops often appear after changing SSL mode, moving to a CDN or switching between www and non-www. A website monitor on your home page notices straight away, since a page that never stops redirecting never loads.
Keep reading
- Browser errors · TroubleshootingERR_CONNECTION_REFUSED: what it means and how to fix itThe server is reachable but nothing accepts connections on the port. Quick checks for visitors, and the causes site owners should check first.October 5, 2026 · 4 min read
- Browser errors · TroubleshootingERR_CONNECTION_TIMED_OUT: why a site takes too long to respondNothing answered your browser at all. How to tell a firewall dropping traffic from a server that's down or a domain pointing to the wrong IP.October 5, 2026 · 4 min read