All articles
Privacy & Security

How to fix ERR_TOO_MANY_REDIRECTS

Trace the addresses in a redirect loop and fix conflicting HTTP, www, CDN or sign-in rules.

Find where the loop starts

A root domain may redirect to www while www redirects back. Compare the home page, a product page and sign-in. Try a private window. A problem limited to one profile can involve a cached redirect, cookie or session. If every visitor gets stuck, examine server and application rules.

Record the redirect chain

Open DevTools → Network, enable Preserve log and visit the URL again. Inspect document responses with 301, 302, 307 or 308 and note each Location header. For a public page you manage, you can also run:

curl -sS -L --max-redirs 8 -D - -o /dev/null https://example.com/

The terminal does not use your browser’s session cookies.

Fix the rules that conflict

  • HTTP/HTTPS: Cloudflare Flexible sends HTTP to the origin. An origin that redirects every HTTP request to HTTPS can loop. Configure a valid origin certificate and validated HTTPS.
  • www/root: Set the same canonical hostname in the CDN and application.
  • Sign-in/account: Check cookie scope and application logs for a session one page accepts and another rejects.

Verify four URL variants

Try HTTP and HTTPS for both the root and www. All should end at the intended working HTTPS address. Confirm that paths and relevant query parameters survive. For a session fix, test both signed-in and signed-out profiles.

SSL & HTTPS check

Check the domain’s HTTP-to-HTTPS redirect, then trace the full chain for the specific page.

Open the tool
KEEP EXPLORING

One more answer is here.

All tools
EXPLORE TOGETHER

Found it useful? Pass it on.