What is a redirect loop?
A redirect loop happens when URL A redirects to URL B and B, directly or through more hops, redirects back to A. No final page exists, so browsers stop and show ERR_TOO_MANY_REDIRECTS, and crawlers abandon the URL. The page is unreachable for everyone.
A redirect chain is slow but ends somewhere. A loop never ends, which makes it the more urgent of the two.
What it looks like in practice
Following the hops with curl shows the pattern repeating:
$ curl -sIL --max-redirs 5 http://example.com/ | grep -iE "^HTTP|^location"
HTTP/1.1 301 Moved Permanently
location: https://example.com/
HTTP/2 301
location: http://example.com/
HTTP/1.1 301 Moved Permanently
location: https://example.com/
Chrome reports "This page isn't working. example.com redirected you too many times." Firefox says the page "isn't redirecting properly". Googlebot follows up to 10 hops before giving up, and Search Console files the URL under Redirect error in the Page indexing report.
The usual causes
- HTTPS handled in two places that disagree. The classic case is a CDN set to fetch from the origin over HTTP while the origin forces HTTPS. The origin redirects to HTTPS, the CDN fetches over HTTP again, and so on.
- www and non-www rules pointing at each other. The server sends
example.comtowww, and the application sendswwwback. - Trailing slash rules in conflict. One layer adds the slash, another strips it.
- Two redirect rules that undo each other.
/oldto/newwas created last year, and/newto/oldlast week. - Login and cookie redirects. A page that requires a cookie redirects to a page that redirects back when the cookie cannot be set.
Tracing and fixing one
- Find the hop that turns back, with the curl command above or the Network panel with "Preserve log" ticked.
- Work out which layer issues each hop: the response headers often name the server or CDN.
- Remove or correct the rule in one layer so both agree on protocol, hostname and slash.
- Clear caches. A
301is cached by browsers, so test in a private window or with curl, not a normal tab.
Loops on WordPress sites
Start with Settings → General. If WordPress Address and Site Address disagree with the URL the server enforces, for example one says http:// or lacks www, WordPress redirects to its stored address while the server redirects back. If you are locked out of wp-admin, both values can be set in wp-config.php with the WP_HOME and WP_SITEURL constants.
Behind a proxy or CDN that terminates HTTPS, WordPress may not know the visitor is on a secure connection and keeps redirecting to it. The fix is at the proxy: fetch from the origin over HTTPS end to end.
For rules created in a plugin, check that a new redirect's target is not itself the source of another rule. Our redirect rule generator flags chains and loops in a list before you deploy it, and the guide to fixing redirect chains covers cleanup.
Common questions
How do I fix ERR_TOO_MANY_REDIRECTS?
First clear cookies for the site and retry in a private window. If the error stays, trace the hops with curl -IL, find the two rules that send requests back and forth, and remove one. On WordPress, mismatched site addresses and CDN SSL settings are the common culprits.
Do redirect loops affect SEO?
Yes. A looping URL cannot be crawled, so it drops out of the index and passes no link signals. Any page that links to it sends visitors to an error.
How many redirects does Google follow?
Googlebot follows up to 10 redirect hops. If it has not reached a final page by then, Search Console reports a redirect error for the URL.