How to Find and Fix Redirect Chains and Loops: A Technical Troubleshooting Guide
redirect troubleshootingtechnical SEOHTTP status codesApacheNginxCloudflare

How to Find and Fix Redirect Chains and Loops: A Technical Troubleshooting Guide

RRedirect Portal Editorial Team
2026-11-01
6 min read

A repeatable workflow for finding redirect chains and loops, checking status codes, and fixing HTTP, HTTPS, www and canonicalisation conflicts.

Redirect chains and loops can slow troubleshooting, confuse crawlers, and prevent users from reaching the intended page. This guide provides a repeatable workflow for checking redirect status codes, tracing each hop, isolating conflicting HTTP, HTTPS, www and non-www rules, and keeping redirect behaviour under review after site changes.

Overview

A redirect chain occurs when one URL redirects through one or more intermediate URLs before reaching its final destination. For example, http://example.co.uk/page might redirect to https://www.example.co.uk/page, which then redirects to https://example.co.uk/page/. Each step is a separate server response.

A redirect loop is different: the request never reaches a final page because rules send it repeatedly between URLs, or a URL redirects back to itself. Common patterns include HTTP-to-HTTPS rules conflicting with a proxy or CDN, www and non-www rules pointing in opposite directions, and trailing-slash or uppercase rules that do not agree with the application.

The objective is not to remove every redirect. A carefully implemented 301 redirect is often the correct permanent route for a retired URL, domain change or HTTPS migration. The objective is to make each important source URL reach one canonical destination with as few hops as practical. A temporary 302 redirect may be appropriate while a destination is being tested or a routing decision is genuinely temporary, but it should not be left in place accidentally.

Start with the exact URL that is failing, including its protocol, hostname, path, capitalisation, trailing slash and query string. Small differences can trigger different rules.

What to track

1. The complete redirect path

Record every response in order, including the status code and Location header. A useful test table contains:

  • Requested URL
  • Response status, such as 301, 302, 307 or 308
  • Location header returned by the server
  • Next URL requested
  • Final status and destination
  • Response time for each hop

A redirect checker can reveal this path quickly, but verify important findings with a second method. Browser developer tools show the Network request sequence, while a command-line check makes the request reproducible. For example, curl -I https://example.co.uk/old-page requests headers only. To follow redirects and display each response, use curl -I -L https://example.co.uk/old-page. Compare results with and without cookies, authentication and query parameters where those conditions matter.

2. Redirect status codes and destination quality

Check whether the status code matches the intended behaviour. A permanent URL change generally calls for a permanent redirect, commonly 301 or 308. A temporary route may use 302 or 307. Do not change a status code merely to make a checker look cleaner: first confirm the business and technical purpose of the rule.

Then inspect the final response. A redirect that ends at another redirect, a 404 page, a blocked page or an unrelated URL is not a successful route. For SEO troubleshooting, compare the final destination with the page's canonical tag, internal links and XML sitemap entry. A redirect and a canonical are different controls: a redirect sends the requester elsewhere, while a canonical indicates a preferred URL to systems that still access the page.

3. Rule ownership and configuration layers

Identify every layer that can issue a redirect. Possible sources include DNS or domain forwarding, a hosting control panel, a CDN such as Cloudflare, a web server, a WordPress plugin, application code and JavaScript. Multiple layers may each appear reasonable but create a chain when combined.

For Apache, review .htaccess and virtual-host configuration. For Nginx, inspect server blocks and included configuration files. For Cloudflare, check redirect rules, page rules and origin behaviour. In WordPress, review redirect plugins, site URL settings and code that alters the request. Make one layer the clear owner of each normalisation decision, such as HTTPS or hostname selection.

Cadence and checkpoints

Run a focused redirect review monthly or quarterly, depending on how often URLs and infrastructure change. A smaller site may maintain a representative test set; a large site should combine scheduled checks with crawler and log analysis.

Keep a test list covering:

  • HTTP and HTTPS versions of the homepage
  • www and non-www hostnames
  • Important migrated URLs and high-traffic landing pages
  • Paths with and without trailing slashes
  • Uppercase and lowercase variants where relevant
  • URLs containing campaign parameters
  • Old domain URLs after a domain change
  • QR codes, short links and other managed forwarding URLs

Repeat the checks after publishing server changes, installing a WordPress redirect plugin, changing CDN settings, migrating hosting, enabling HTTPS, changing URL structure or uploading a bulk redirect map. Use a crawl before and after a migration when possible. The redirect rule testing checklist can provide a release gate, while the website migration redirect checklist is useful for larger URL changes.

Server logs add context that a one-off checker cannot provide. Look for repeated requests to old URLs, spikes in 3xx responses, requests cycling between two paths, and redirects followed by 4xx or 5xx responses. Separate genuine user and crawler demand from internal monitoring traffic where your logging setup allows it.

How to interpret changes

A new chain appears

Compare the current path with the last known good result. If a new hop was introduced, find the configuration layer that added it. The usual fix is to change the original rule so it points directly to the final canonical URL, rather than adding another rule to handle the intermediate URL. Update internal links and the redirect map at the same time so future requests use the final destination directly.

A loop appears only on HTTPS

Check whether the application believes the request is HTTP while the visitor is using HTTPS through a proxy or CDN. Review forwarded protocol handling, TLS mode and origin rules with the hosting or infrastructure owner. Avoid adding a second HTTPS redirect until the existing source of truth is understood.

A loop involves www and non-www

List the rules for both hostnames and follow each direction independently. One hostname should redirect to the selected canonical hostname; the canonical hostname should serve the page without redirecting back. Check that DNS, domain forwarding, CDN rules and web-server rules are not making different choices.

Tracking parameters disappear

Inspect the Location header to see whether the query string is preserved. Some rules intentionally remove parameters, but removing UTM link tracking or campaign parameters can make reporting incomplete. Test parameters that are required by the destination and document any deliberate stripping. The guide to redirects and query parameters covers this case in more detail.

The crawler reports a redirect but the browser appears fine

Check whether the crawler is requesting a different protocol, hostname, user agent, locale, cookie state or query string. Also check whether a browser cache is hiding a previous response. Test from a clean environment and compare the raw headers rather than relying only on the visible page.

When to revisit

Revisit this guide on your monthly or quarterly technical review, and immediately after any change that can affect routing. Prioritise checks after a site migration, domain change, HTTPS rollout, CDN or hosting move, URL restructuring, CMS update, redirect-plugin change, bulk redirect upload or campaign-link template change.

Maintain a simple redirect register with the source URL, intended status, final destination, owner, date tested and result. When a test fails, capture the full chain before changing rules. Then identify the first unexpected hop, correct the responsible layer, retest direct and variant URLs, and crawl the affected section again.

For migrations, use a deliberate redirect map rather than adding rules reactively. The 301 redirect mapping template can help connect old URLs to their closest valid destinations. For large lists, validate duplicates, loops, conflicting targets and missing destinations before upload; the bulk redirect upload guide covers that process.

A reliable maintenance routine is straightforward: keep a representative test set, record the full response path, check logs for recurring failures, and make one system responsible for each normalisation rule. That approach makes redirect troubleshooting repeatable instead of dependent on discovering problems through user reports.

Related Topics

#redirect troubleshooting#technical SEO#HTTP status codes#Apache#Nginx#Cloudflare
R

Redirect Portal Editorial Team

Technical SEO Editor

Senior editor and content strategist. Writing about technology, design, and the future of digital media. Follow along for deep dives into the industry's moving parts.