Redirect loop

On this page 7

A redirect loop is a configuration error in which a URL redirects back to itself, directly or through a chain of other URLs, so that the request never reaches a final page with a 200 status code. In technical SEO, a redirect loop is one of the most damaging crawl errors because it makes the affected URL completely unreachable for both visitors and search engine crawlers.

Browsers stop the cycle after a fixed number of hops and display a message such as ERR_TOO_MANY_REDIRECTS, while crawlers such as Googlebot abandon the chain and record a redirect error for the URL. Any ranking signals, backlinks or internal links pointing at that address are effectively wasted until the loop is fixed.

How a redirect loop forms

A redirect loop forms when two or more redirect rules contradict each other, so that every response sends the client to an address that eventually sends it back. Each hop is a normal HTTP response, typically a 301 or 302 status code with a Location header, and no single rule looks wrong when read in isolation.

The simplest case is a two-step loop: URL A redirects to URL B, and URL B redirects to URL A. Longer loops pass through three or more addresses before returning to the start, which makes them harder to see in server configuration files. A self-redirect, in which a URL points to exactly itself, is the shortest possible loop and often results from a rule that matches its own output.

Loops are frequently created by separate layers acting independently: the web server, a content management system plugin, a content delivery network and the application code may each apply their own rules. When one layer enforces HTTPS and another forces HTTP, or one adds a trailing slash and another removes it, the two layers pass the request back and forth indefinitely.

The following table lists the most common configuration conflicts that produce a redirect loop.

CauseWhat the rules doTypical layer involved
Protocol conflictOne rule forces HTTPS, another forces HTTPCDN or proxy and origin server
Host conflictOne rule adds www, another removes itServer config and CMS settings
Trailing slash conflictOne rule adds a slash, another strips itServer rewrite rules and application
Stale redirect mapOld migration rules point to URLs that now redirect backRedirect plugin or rewrite file
Login or cookie logicPage requires a session that the redirect target never setsApplication code
Language or geo redirectsLocale detection sends the user between regional versionsApplication or edge logic
Typical causes of a redirect loop

How browsers and crawlers handle redirect loops

Every client that follows redirects applies a maximum hop limit to protect itself from infinite cycles. Once the limit is reached, the client stops and reports an error instead of content, so the outcome of a loop is always a failed request, never a slow page.

Googlebot follows up to 10 redirect hops in a single chain, according to its public crawling documentation, and then gives up on that crawl attempt. The URL is then reported in Search Console as a redirect error, and it is excluded from the index or eventually dropped if it was indexed before. Other crawlers apply similar, though not identical, limits.

ClientApproximate hop limitVisible symptom
Googlebot10 hopsRedirect error in Search Console
ChromeAbout 20 hopsERR_TOO_MANY_REDIRECTS page
FirefoxAbout 20 hopsThe page is not redirecting properly
SafariAbout 16 hopsToo many redirects occurred
curl50 hops with -L by defaultMaximum redirects followed error
Redirect limits and visible symptoms by client

Hop limits differ between versions and tools, so the numbers above are typical values rather than guarantees. The practical conclusion is the same for every client: a true loop always fails, and even a long but finite chain risks being cut off before the final URL.

A redirect loop differs from other redirect problems because it has no final destination at all. A redirect chain eventually ends on a working page, while a loop only returns to an address it has already visited.

IssueFinal page reachedSEO impact
Redirect loopNeverURL cannot be crawled or indexed
Redirect chainYes, after several hopsSlower crawling and possible signal loss
Redirect to a 404Yes, but it is an error pageLink equity points at a dead end
Soft 404 redirectYes, usually the homepageTreated as a missing page by Google
Meta refresh loopNeverSame as a loop, but harder to detect server-side
Redirect loop versus neighboring issues

A meta refresh redirect or a JavaScript redirect can also form a loop. These client-side loops are not visible in server response headers, so they require a rendering crawler or a browser test to detect.

Diagnosing and fixing a redirect loop

Diagnosis starts with tracing every hop of the request and recording the status code and Location header at each step. A command such as curl -sIL or a browser’s network panel with preserve log enabled shows the full sequence, and the repeated URL identifies where the cycle closes.

  1. Trace the chain and note which rule produces each hop.
  2. Clear browser cookies and caches, because cached 301 responses can make a fixed loop appear to persist.
  3. Compare the protocol, host and trailing slash settings across every layer: CDN, load balancer, server and CMS.
  4. Remove the conflicting rule and keep one canonical destination for each URL.
  5. Re-crawl the affected URLs and request validation in Search Console.

The decision table below matches common findings to the correct fix.

Observed patternLikely causeRecommended fix
HTTP and HTTPS alternateProxy terminates TLS, origin sees HTTPUse the forwarded protocol header in the origin rule
www and non-www alternateCMS site URL disagrees with server ruleAlign the CMS setting with the server canonical host
Slash added then removedTwo trailing slash policiesChoose one policy and remove the other rule
Loop only for logged-out usersAuthentication redirect targets a protected pageExempt the login page from the access rule
Loop after migrationOld and new redirect maps overlapFlatten the map so each source has one final target
Symptom, cause and recommended fix

Preventing redirect loops in SEO work

Prevention relies on a single source of truth for redirects and on testing before deployment. Teams that manage redirects in several places at once, such as a plugin, an .htaccess file and a CDN dashboard, create the conditions in which loops appear.

  • Keep redirect maps flat: every old URL should point directly to its final destination.
  • Run a pre-launch crawl of the full redirect list during every site migration.
  • Monitor Search Console for new redirect errors after any configuration change.
  • Document which layer owns protocol, host and slash normalization.
  • Point internal links at final URLs so that crawlers rarely meet redirects at all.

A common misconception is that a loop affects only one page. Because global rules such as HTTPS enforcement apply site-wide, a single misconfigured rule can take an entire domain offline for users and crawlers within minutes.

Put simply

A redirect loop is like a pair of signs that each say the shop has moved to the other sign’s address. Anyone who follows them walks in circles and never reaches the shop.

Web browsers notice the circle after a number of turns and give up with an error. Search engines do the same, so the page cannot appear in search results until someone removes one of the contradictory signs.

In practice

An online retailer moves its site behind a content delivery network that handles HTTPS. The CDN forwards requests to the origin server over plain HTTP, and an old server rule still says that every HTTP request must be redirected to HTTPS. Each request bounces between the CDN and the origin, and visitors see ERR_TOO_MANY_REDIRECTS on every page.

Within a day, Search Console reports redirect errors on thousands of product URLs. The technical SEO specialist traces one URL with curl, sees the same HTTPS address repeated ten times, and changes the origin rule to read the forwarded protocol header instead of the connection protocol. The site loads normally within minutes, validation in Search Console passes over the following week, and organic traffic returns to its previous level without lasting ranking loss.