Skip to main content

How to Find and Fix Redirect Loops

A redirect loop happens when two or more URLs redirect to each other in a cycle. The browser cannot resolve the chain and shows a "too many redirects" error.

What is a redirect loop?

A redirect loop occurs when URL A redirects to URL B, and URL B redirects back to URL A — or through a longer chain that eventually returns to the starting URL. The browser follows the redirects until it hits a limit (usually 20) and displays an error. If you're new to redirects, read our guide to HTTP redirects first.

Common error messages include:

  • ERR_TOO_MANY_REDIRECTS (Chrome)
  • The page isn't redirecting properly (Firefox)
  • Too many redirects (Safari)

Why redirect loops happen

Redirect loops are almost always caused by conflicting redirect rules. The most common scenarios:

Conflicting .htaccess rules

If you have a rule that redirects /old-page to /new-page, and another rule that redirects /new-page back to /old-page, you have a loop. This happens when two people add rules without checking for conflicts.

HTTP/HTTPS conflicts

A common loop occurs when a server redirects HTTP to HTTPS, but a CDN or load balancer redirects HTTPS back to HTTP. The request bounces between protocols indefinitely.

CMS plugin conflicts

WordPress sites with multiple redirect plugins (or a redirect plugin conflicting with server-level redirects) can create loops. For example, a plugin might add a trailing slash redirect while the server already has one.

CDN and server conflicts

If Cloudflare (or another CDN) has a redirect rule, and your origin server has a conflicting rule, the request may loop between them.

How to find redirect loops

The simplest way to detect a redirect loop is to use the NodSEO Redirect Checker. Enter the URL and trace the full chain. If you see the same URLs appearing multiple times, or the tool reports a loop, you have a problem.

You can also use curl from the command line:

curl -IL https://example.com/page

If the output shows the same redirect repeated several times before curl gives up, you have a loop.

How to fix redirect loops

The fix depends on the cause. Here's a systematic approach:

Step 1: Check your .htaccess file

Look for conflicting rules. Common patterns to check:

  • Multiple RewriteRule directives that affect the same URLs
  • HTTP and HTTPS redirect rules that conflict
  • Trailing slash rules that conflict with explicit redirects

Step 2: Check server configuration

If you're on Nginx, check your server blocks for conflicting return directives. If you're on Apache, check both .htaccess and the main server config.

Step 3: Check CDN rules

If you're using Cloudflare, check your Page Rules and Redirect Rules. Make sure they don't conflict with server-level redirects.

Step 4: Check CMS plugins

If you're on WordPress, disable redirect plugins one by one to identify the conflict. Use only one redirect management method — either server-level or plugin-level, not both.

Step 5: Verify the fix

After making changes, use the Redirect Checker again to confirm the loop is resolved. The redirect chain should be clean — ideally one hop from the original URL to the final destination.

Preventing redirect loops

Prevention is better than debugging:

  • Document your redirects. Keep a spreadsheet of all redirect rules so you can check for conflicts before adding new ones.
  • Use one redirect method. Either use server-level redirects (.htaccess, Nginx) or a CMS plugin — not both.
  • Test before deploying. Always test redirect rules in a staging environment before pushing to production.
  • Audit regularly. Use the Redirect Checker to scan for chains and loops periodically.

Frequently Asked Questions

What is a redirect loop?

A redirect loop occurs when URL A redirects to URL B, and URL B redirects back to URL A (or through a chain that eventually returns to the starting URL). This creates an infinite cycle that browsers cannot resolve.

What error do users see when there's a redirect loop?

Browsers display 'Too many redirects' or 'ERR_TOO_MANY_REDIRECTS' error. The page fails to load entirely.

Do redirect loops hurt SEO?

Yes. Search engines cannot index pages stuck in redirect loops. They will drop these pages from their index and may flag them as errors in Search Console.

How do I detect a redirect loop?

Use the NodSEO Redirect Checker to trace the redirect chain. If you see the same URLs repeating or the tool reports a loop, you have a redirect issue.

What causes redirect loops?

Common causes include conflicting .htaccess rules, HTTP/HTTPS redirect conflicts, CMS redirect plugins conflicting with server redirects, and CDN redirect rules overriding server rules.

Related Comparisons

Related Guides

More Redirect Checker Guides

Find Redirect Loops Now

Trace any URL's redirect chain and detect loops instantly.

Open Redirect Checker