Technical

Redirect Loop

A redirect loop occurs when two or more URLs redirect to each other in a cycle, preventing browsers and crawlers from reaching a final destination page.

Quick Answer

  • What it is: A redirect loop occurs when two or more URLs redirect to each other in a cycle, preventing browsers and crawlers from reaching a final destination page.
  • Why it matters: Blocks users and search engines from accessing your content, causing indexing failures and lost traffic.
  • How to check or improve: Use curl or browser DevTools to trace the redirect chain. Fix conflicting server rules, CMS settings, or CDN configurations.

When you'd use this

Blocks users and search engines from accessing your content, causing indexing failures and lost traffic.

Example scenario

Hypothetical scenario (not a real company)

A team might use Redirect Loop when Use curl or browser DevTools to trace the redirect chain. Fix conflicting server rules, CMS settings, or CDN configurations.

Common mistakes

  • Confusing Redirect Loop with Indexability: The ability of a web page to be added to a search engine's index, determined by technical factors like robots directives, canonical tags, and crawlability.
  • Confusing Redirect Loop with Canonical URL: The preferred version of a web page specified using the rel=canonical tag, telling search engines which URL to index when duplicate or similar content exists.
  • Confusing Redirect Loop with 301 Redirect: A 301 redirect is a permanent HTTP redirect that tells browsers and search engines a page has moved to a new URL, passing most link equity to the destination.

How to measure or implement

  • Use curl or browser DevTools to trace the redirect chain
  • Fix conflicting server rules, CMS settings, or CDN configurations

Check your site's indexability with Rankwise

Start here
Updated Mar 13, 2026·5 min read

A redirect loop happens when URL A redirects to URL B, and URL B redirects back to URL A (or through a chain that eventually returns to URL A). Browsers display "ERR_TOO_MANY_REDIRECTS" or "This page isn't working" after following the loop several times. Search engine crawlers hit the same wall and abandon the page.

The result: your content becomes completely inaccessible. No user can view it. No crawler can index it. Any link equity pointing to pages in the loop is wasted.

How Redirect Loops Form

Most redirect loops come from conflicting rules in different layers of the tech stack. Each layer is correct on its own, but together they create a cycle.

HTTPS/HTTP Conflicts

The most common redirect loop pattern:

  1. Server rule: Redirect all HTTP requests to HTTPS
  2. CDN or load balancer: Connects to the origin server over HTTP
  3. Result: Browser → HTTPS → CDN → HTTP → Server redirects to HTTPS → CDN → HTTP → infinite loop

This happens frequently with Cloudflare, AWS CloudFront, and other CDN/proxy setups where the connection between CDN and origin uses HTTP while the CDN serves HTTPS to users.

WWW/Non-WWW Conflicts

  1. DNS points www.example.com to a service that redirects to example.com
  2. Server rule redirects example.com to www.example.com
  3. Result: Endless bounce between www and non-www

CMS + Server Rule Conflicts

  1. WordPress "Site URL" setting points to https://example.com/
  2. .htaccess rule redirects / to /home
  3. WordPress internally redirects /home back to /
  4. Result: Loop between / and /home

Trailing Slash Conflicts

  1. CDN normalizes URLs by adding trailing slashes
  2. Application removes trailing slashes via redirect
  3. Result: /page//page/page/ → infinite loop

How to Diagnose Redirect Loops

Step 1: Trace the Chain

Use curl to follow redirects step by step:

curl -I -L --max-redirs 10 https://example.com/page

This shows each redirect hop with its status code and destination. You'll see the pattern repeat when it loops.

Step 2: Check Browser DevTools

Open Chrome DevTools → Network tab → request the URL. Look for repeated 301/302 responses. The "Initiator" column shows the redirect chain visually.

Step 3: Test Different Variations

Try each URL variation separately to identify which one triggers the redirect:

  • http://example.com/page
  • https://example.com/page
  • http://www.example.com/page
  • https://www.example.com/page
  • With and without trailing slash

Step 4: Check Each Layer

  1. DNS — What does the domain resolve to?
  2. CDN/Proxy — Does the CDN add its own redirects?
  3. Web server — Check nginx.conf, .htaccess, or server config for redirect rules
  4. Application — Check CMS settings, routing config, and middleware

How to Fix Common Redirect Loops

HTTPS loop with CDN: Set the CDN to use "Full SSL" mode so it connects to the origin over HTTPS, matching what it serves to users.

WWW conflict: Pick one canonical form (www or non-www) and configure both DNS and server rules consistently. Don't redirect in both directions.

CMS conflict: Align the CMS URL settings with your server redirect rules. If WordPress says the site URL is https://example.com, don't have a server rule that redirects to https://www.example.com.

Trailing slash loop: Choose one format and enforce it at a single layer. Don't have the CDN adding slashes while the application removes them.

SEO Impact of Redirect Loops

Indexing failure. Google's crawler abandons pages in a redirect loop after a few attempts. The page drops from the index entirely — you'll see it reported as a redirect error in Search Console's Coverage report.

Wasted crawl budget. Every attempt to crawl a looped URL consumes crawl budget without successfully indexing a page. For large sites, this means other pages get crawled less frequently.

Lost link equity. External backlinks pointing to looped URLs pass no value. The link equity sits in a dead end until the loop is resolved.

User experience. Visitors see an error page instead of your content. Depending on the browser, they see "ERR_TOO_MANY_REDIRECTS," "This page isn't working," or a blank page.

FAQs

How many redirects before a loop error?

Browsers typically stop after 20 redirects. Google's crawler follows up to 10 redirect hops. If your chain exceeds these limits — whether it's a true loop or just an excessively long chain — the page becomes inaccessible.

Can a redirect loop affect other pages on my site?

Not directly. The loop only blocks the specific URLs involved. However, if many pages are stuck in loops, the cumulative crawl budget waste can slow indexing for the rest of your site.

How do I prevent redirect loops during site migrations?

Map every old URL to its new destination before launching. Test the redirect rules in a staging environment. Run a full-site crawl after launch to catch any loops. Pay special attention to the HTTP/HTTPS and www/non-www layers, which are where most migration loops originate.

Will Google penalize my site for redirect loops?

There's no ranking penalty for redirect loops. The affected pages simply fail to index. Once you fix the loop, Google will recrawl and reindex the pages — typically within days if the site is crawled frequently.

Put GEO into practice

Generate AI-optimized content that gets cited.

Try Rankwise Free
Newsletter

Stay ahead of AI search

Weekly insights on GEO and content optimization.