Seoxpert.io
highCrawl & Links

Redirect Loops Detected

Redirect loops occur when two or more URLs redirect to each other in a cycle, preventing users and search engines from ever reaching the intended destination pa

By Seoxpert Editorial · Published · Updated

Why it matters

Redirect loops prevent both users and search engines from accessing your content. Browsers will display errors like 'Too many redirects', harming user experience. Search engines like Googlebot will stop crawling these URLs and may remove them from the index, leading to lost traffic and rankings.

Impact

Redirect loops can cause significant SEO problems, including deindexing of affected pages, loss of organic traffic, and poor user experience. They also waste crawl budget and can negatively impact site authority if widespread.

How it's detected

Redirect loops are typically detected by crawling tools, browser errors, or server logs. Tools like Screaming Frog, Google Search Console, or manual testing with browser developer tools can reveal URLs that never resolve due to circular redirects.

Common causes

  • Conflicting or overlapping redirect rules in .htaccess, Nginx, or server configuration files
  • CMS plugins or extensions that automatically set up redirects without proper checks
  • Incorrect logic in application-level redirect code (e.g., in PHP, Node.js, etc.)
  • Migrations or URL structure changes not fully mapped, leading to cycles
  • Multiple redirect systems (e.g., server-level and CMS-level) operating simultaneously

How to fix it

Map out the entire redirect chain for affected URLs using a crawler or browser network tools. Identify the intended final destination for each URL. Remove or adjust the redirect rule(s) causing the cycle, ensuring that every redirect chain ends at a valid, reachable page with no further redirects.

Code examples

Problematic .htaccess Redirect Loop

# Page A redirects to B
Redirect 301 /page-a /page-b
# Page B redirects back to A
Redirect 301 /page-b /page-a

Fixed .htaccess Redirect (No Loop)

# Page A redirects to B
Redirect 301 /page-a /page-b
# Page B now resolves to its content (no redirect back to A)

Problematic Express.js Redirect Loop

// app.js
app.get('/page-a', (req, res) => res.redirect(301, '/page-b'));
app.get('/page-b', (req, res) => res.redirect(301, '/page-a'));

Fixed Express.js Redirect (No Loop)

// app.js
app.get('/page-a', (req, res) => res.redirect(301, '/page-b'));
app.get('/page-b', (req, res) => res.send('This is Page B'));

FAQ

How do I identify which URLs are involved in a redirect loop?

Use a crawling tool like Screaming Frog, Ahrefs, or Google Search Console to crawl your site and look for URLs that never resolve and show repeated redirects. Alternatively, use browser developer tools (Network tab) to follow the redirect chain and see where it cycles.

Can redirect loops affect my entire site or just specific pages?

Redirect loops can be isolated to specific URLs or, if caused by broad redirect rules, can affect large sections or even the entire site. It's important to check the scope of your redirect rules.

Will Google automatically fix or ignore redirect loops?

No, Googlebot will stop crawling URLs that result in redirect loops and may eventually deindex them. It is up to the site owner to resolve the issue.

What is the maximum number of redirects allowed before browsers or Googlebot give up?

Browsers and Googlebot typically follow up to 10 consecutive redirects. If this limit is exceeded, they will stop and show an error or abandon the crawl.

Can HTTPS/HTTP or www/non-www redirects cause loops?

Yes, misconfigured redirects between HTTPS/HTTP or www/non-www versions can easily create loops, especially if rules conflict or are duplicated at different levels (server, CMS, CDN).

How can I prevent redirect loops during a site migration?

Carefully plan and document all redirects before deploying them. Test redirect chains with crawling tools and ensure that each old URL maps directly to a final destination without intermediate hops or cycles.

Found this issue on your site?

Run a scan to see if Redirect Loops Detected affects your pages.

Scan my website →