Skip to content
← All articles

ERR_TOO_MANY_REDIRECTS Fix

Short answer. ERR_TOO_MANY_REDIRECTS means the site is looping: page A points to B, B points back to A, and the browser aborts the endless loop. The usual culprits are a conflict between an SSL/TLS проверку redirect and a CDN's SSL mode (Cloudflare Flexible), bad www/non-www rules, or a corrupt session cookie. The first step is to see the whole chain with curl -sIL https://example.com and find where it loops.

What ERR_TOO_MANY_REDIRECTS means

Browsers cap the number of consecutive redirects (usually ~20). Exceed the limit and you get this error. Technically the server keeps returning 301/302 responses with a Location header that sends you back to an already-visited URL over and over.

A redirect loop is always a configuration error, not a network failure. The site "works," but its redirect logic contradicts itself.

Main causes

  • Cloudflare Flexible SSL — the CDN sends HTTP to the server, the server redirects to HTTPS, loop.
  • www vs non-www conflict — one rule sends to www, another sends it back.
  • HTTP→HTTPS redirect configured on both the server and the CMS/CDN at once.
  • Corrupt session cookie makes the app redirect to login in a circle.
  • Bad .htaccess or nginx config with looping rewrite rules.

Diagnostics: see the whole chain

The key tool is curl with follow-redirects. It shows every step and Location header:

# Show the full redirect chain and headers
curl -sIL https://example.com

# Verbose mode with status codes
curl -I -v https://example.com

Look for repeating URLs in the Location: headers — that's the loop point.

User-side fix

  1. Clear cookies for this specific site — a frequent cause of loops on login pages.
  2. Open the site in incognito to rule out old cookies and cache.
  3. Clear the browser cache completely.
  4. Check whether an extension or antivirus is rewriting headers.

Server-side fix

If everyone loops, fix the redirect configuration. Typical steps:

  • Cloudflare: switch SSL/TLS from Flexible to Full or Full (strict).
  • WordPress: ensure siteurl and home use the same protocol and domain (both https, both with or without www).
  • nginx/Apache: keep exactly one HTTP→HTTPS rule and one www/non-www rule, with no duplicate in the CMS.
# Correct single HTTPS redirect (nginx)
server {
    listen 80;
    server_name example.com www.example.com;
    return 301 https://example.com$request_uri;
}

Causes and solutions

CauseSolution
Cloudflare Flexible SSLSwitch to Full (strict)
www/non-www conflictKeep one canonical rule
Double HTTP→HTTPSRemove the duplicate in CMS or CDN
Corrupt cookieClear the site's cookies
Looping rewriteSimplify .htaccess/nginx rules

How to prevent it from recurring

After any redirect change, verify the chain — one stray rule recreates the loop. An automated redirect checker shows the full path and status codes without manual curl. And monitoring with alerts catches the moment a deploy or SSL-mode change breaks redirects again.

Check the redirect chain in one click, and the HTTP checker shows headers and codes. For sound redirect practice, read redirects and SEO. For continuous control, see the monitoring guide.

FAQ

Why did the error appear after enabling Cloudflare?

Almost always due to Flexible SSL: Cloudflare reaches the server over HTTP, the server redirects to HTTPS, and a loop forms. Switch to Full (strict).

Will simply clearing cookies help?

If the loop is on a login page, yes — a corrupt session cookie is a common cause. But if the server config is at fault, clearing cookies won't help everyone.

How do I quickly find where it loops?

Run curl -sIL https://example.com and find the repeating URL in the Location headers. That's the loop point.

How many redirects are acceptable?

Technically a browser tolerates ~20, but for SEO and speed keep the chain to no more than 1–2 hops.

Check your website right now

Check your site's HTTP status →
More articles: HTTP
HTTP
HTTP 301 vs 302 Redirect: Differences and When to Use Each
15.04.2026 · 124 views
HTTP
HTTP Cache-Control Headers: Complete Caching Guide
15.04.2026 · 176 views
HTTP
Cloudflare 522 Connection Timed Out Fix
23.06.2026 · 25 views
HTTP
HTTP/2 vs HTTP/3: Differences and Performance Comparison
13.03.2026 · 146 views