Launch offer: 20% off your first quarter on any plan, until November 11.

--d--h--m--s
Claim it

Technical SEOBeginner

Redirect Loop

A redirect loop happens when URLs redirect to each other in a cycle, so the request never reaches a page and browsers and crawlers give up.

Also called: Infinite redirect, ERR_TOO_MANY_REDIRECTS

A redirect loop is a set of redirects with no end: page A sends the visitor to page B, and page B sends them back to A. Longer cycles work the same way. No final page ever loads, so people see a browser error and search engines cannot index anything at those URLs. Google's Page indexing report lists a redirect loop as one of the causes of its Redirect error status.

Need help with SEO?

Comppound runs SEO and AI search for SaaS companies. We plan what to publish, produce it with AI, and every page passes automated checks, and a person reviews samples and anything high-risk.

  • Published to your site and tracked in Search Console
  • One person answers for your account
  • Plans from $400 a month, terms from 3 months

What causes loops

Loops usually come from two rules that were each sensible alone and conflict when combined. A common place to find them is the point where a CDN, a web server, a framework and a CMS each apply their own redirects.

  • HTTPS rules that conflict, such as a CDN talking to the origin over HTTP while the origin forces HTTPS
  • Trailing slash rules set in two layers with opposite preferences
  • www and non-www rules that disagree between DNS, CDN and server
  • A new redirect that points back at a URL that already redirects to the source
  • Login rules that send signed-out users to a page that also requires login

How crawlers and browsers respond

RFC 9110 says a client should detect and intervene in cyclical redirections. Browsers do this by stopping and showing an error. Google documents that Googlebot follows up to 10 redirect hops by default for general web content, and reports problems such as loops under Redirect error in the Page indexing report.

Content from the redirecting URLs is ignored, so nothing from the looping pages can be used.

How to find and fix one

Trace the hops from the command line so browser caches do not confuse the result. Find the rule behind each hop, decide on the single correct final URL, and change the rules so every variation goes there directly.

curl -sIL --max-redirs 12 https://example.com/page | grep -iE "^HTTP|^location"

Example

A trailing slash conflict after a replatform

Hypothetical CRM Fernledger moved its blog to a new framework that removes trailing slashes. Its CDN still had an older rule that added them. Every blog URL bounced between the two versions, and the posts showed a browser error for anyone who visited.

The team removed the CDN rule, kept the framework behavior, and checked a sample of URLs with curl. They then used URL Inspection to confirm that Google could fetch the pages.

Common mistakes

Testing only in a browser

Browsers cache permanent redirects, so a fix may look broken or a bug may look fixed. Use curl or a private window to test.

Patching the symptom with another redirect

Adding one more rule often makes the cycle longer. Find the conflicting rules and remove one.

Frequently Asked Questions

A chain has several hops but ends on a real page. A loop never ends, so there is no page to load.

They cannot be indexed from those URLs while the loop lasts, because Google has no final content to process. Fix the loop first, then use URL Inspection to check the result.

Keep reading

  • Redirect Chain: A redirect chain is when a URL redirects to another URL that redirects again, forcing crawlers and visitors through several hops.
  • 301 Redirect: A 301 redirect is an HTTP response telling browsers and search engines a URL has moved permanently to a new address.
  • Trailing slash: A trailing slash is the / at the end of a URL path. /pricing and /pricing/ are different URLs to search engines, so pick one and redirect the other.
  • Page Indexing Report: The Page indexing report in Google Search Console shows which of your URLs Google has indexed and gives a reason for each one it has not.
  • Bing Webmaster Tools: Bing Webmaster Tools is Microsoft's free console for site owners. It shows how Bing crawls and indexes a site and offers SEO reports and URL submission.
  • Content delivery network: A CDN is a network of servers worldwide that caches and serves a site's files close to each visitor, cutting load times and shielding the origin server.
  • Crawl Errors: Crawl errors are failures that happen when a search engine tries to fetch a URL, such as server errors, redirect problems, blocked pages or DNS failures.
  • Crawlability: Crawlability is how easily search engine and AI crawlers can discover and fetch the pages on a site.

Issues with technical SEO? Let Comppound fix them.

We find what stops Google and AI crawlers reading your site, and ship the fixes instead of handing you a report.