HTTP errors
Why does my site say too many redirects, and how do you fix it?
ERR_TOO_MANY_REDIRECTS means pages redirect in a loop. The usual causes, including CDN SSL settings and conflicting www rules, and how to trace the chain.
Too many redirects means the browser followed a redirect chain that loops back on itself, so it gave up. On your own site the usual causes are a CDN talking to your server over HTTP while the server redirects to HTTPS, or two rules sending www and non-www traffic to each other. Trace the chain with curl to find it.
Published · Last updated
What too many redirects means
Every redirect tells the browser to request a different URL. If that URL redirects again, and again, eventually back to the start, the browser stops after a limit and shows an error. In Chrome it reads ERR_TOO_MANY_REDIRECTS, in Firefox the page is not redirecting properly. Nothing is wrong with the browser. The site's rules contradict each other.
If you are a visitor
Clear the cookies for that site and reload. A stale cookie can trigger a redirect loop on login and language pages. If it persists in a private window, the site is misconfigured and only its owner can fix it.
Why your own site loops, most likely first
- HTTPS mismatch behind a CDN. The CDN connects to your server over plain HTTP, your server redirects to HTTPS, the CDN forwards that HTTPS request to your server over HTTP again, and so on. On Cloudflare this is the classic Flexible SSL loop.
- www and non-www rules that disagree, for example the host redirects to www and the app or DNS provider redirects back to the bare domain.
- An app that decides the protocol from the wrong header. Behind a proxy, the app sees plain HTTP unless it reads the forwarded protocol header, so it keeps redirecting to HTTPS.
- Trailing slash rules that conflict between the server and the framework.
- Login or language redirects that depend on a cookie which is never set, so every visit redirects again.
How to fix it
Trace the chain to see exactly where it turns back:
curl -sIL https://example.com | grep -iE "^(HTTP|location)"
Each line pair shows a status and where it sends you. The loop is the point where an address repeats.
- Behind Cloudflare, set SSL/TLS encryption to Full (strict) with a valid certificate on your origin, so the CDN talks to your server over HTTPS and the server stops redirecting it.
- Pick one canonical host, www or bare, and redirect to it in exactly one place.
- Configure your framework to trust the proxy's forwarded protocol header, so it knows the original request was already HTTPS.
- Make sure HTTP to HTTPS and host normalisation happen in a single hop where possible.
Change one layer at a time and test in a private window. Browsers cache permanent redirects, so an old 301 can keep looping after you fixed the rule.
What redirect loops do to Google and AI crawlers
Googlebot follows a limited number of redirect hops, and a loop never resolves, so the page is treated as an error and dropped if it stays that way. Long chains that do resolve also cost something: every extra hop slows the page for visitors and wastes crawl requests.
What a scan can and cannot tell you
WebAuditOS warns on two to five followed HTTP redirects; longer chains and loops are ungraded by that check, checks that HTTP redirects to HTTPS, and reports pages whose final status is an error. A loop on the start URL stops the scan before it can crawl, so a site-wide loop shows up as a scan that could not begin.
A scan uses one network location and no cookies from a previous visit. Loops that depend on a user's cookie, language or country may not reproduce.
Fixing the loop on the homepage does not prove every path is fixed. Test a deep page and an old URL too.
Short answers
Does clearing cookies fix it? For a visitor, sometimes. For a site owner, it only hides a broken rule.
Why did it start after I added Cloudflare? Most often the SSL mode is Flexible while the origin forces HTTPS. Use Full (strict).
How many redirects is too many for SEO? Aim for one hop. Google follows several, but each costs speed.
Can HSTS cause a redirect loop? Not by itself, but it makes the browser insist on HTTPS, which exposes an HTTPS loop that was already there.
In the product
The checks this maps to
Every check named here runs on every scan, on every plan - what a plan changes is how many pages are crawled, how long the history is kept and what you can do with the result. These are the ids the findings carry, so you can match a line in a report to the explanation above.
- seo.redirect.chain - No long redirect chains
- sec.https.redirect - HTTP redirects to HTTPS
- tech.status.ok - Page returns a successful status
Read next
Technical SEO
What is a 301 redirect, and when should you use it?
A 301 permanently moves a URL and carries its search signals to the new one. When to use 301, 302, 307 or 308, and how to avoid chains and redirect mistakes.
HTTPS and TLS
What is HTTPS, and does your website need it?
HTTPS encrypts the connection between a browser and your site. What it protects, why every site needs it, and how to switch from HTTP safely.