Skip to content
SEOuchAudit my site
Menu

Redirect chains: how to find and fix them

What redirect chains are, what Google says about them, 301 vs 308, how to find chains with a redirect checker, and fixes for Apache, Nginx and Cloudflare.

By Seouch TeamUpdated explainer

Here is what happens when someone types example.com/Shoes into a browser on a site that has been redesigned a few times:

http://example.com/Shoes         301 → https://example.com/Shoes
https://example.com/Shoes        301 → https://www.example.com/Shoes
https://www.example.com/Shoes    301 → https://www.example.com/shoes
https://www.example.com/shoes    301 → https://www.example.com/shoes/
https://www.example.com/shoes/   200 OK

Four redirects before any content. Each rule made sense when someone added it: force HTTPS, then force www, then lowercase URLs, then trailing slashes. Together they form a redirect chain that every visitor and every crawler walks through.

What is a redirect chain?

A redirect chain is a sequence of two or more redirects between the URL that was requested and the URL that finally returns content. Each hop is a separate request and response. One redirect is normal; a chain usually means rules were added over time without updating the older ones, or internal links still point at retired URLs.

The redirect chain glossary entry has a shorter definition. A redirect loop is a different problem: the sequence returns to a URL it already visited and never resolves.

Why redirect chains matter

Google says its crawlers follow up to 10 redirect hops (HTTP status codes and Google), but that you should redirect to the final destination directly, and where that is not possible keep chains to ideally no more than three hops and fewer than five (site moves with URL changes). Its crawl budget guidance adds that long redirect chains have a negative effect on crawling (crawl budget).

In practice, chains cost you in four ways:

  • Crawling. Every hop is a request a crawler spends before reaching content. On large sites that delays discovery of new pages; see crawl budget.
  • Speed. Every hop adds a round trip, and a change of host can add a new connection and TLS handshake. Visitors on mobile networks feel each one.
  • Mixed signals. Google says 301 and 308 redirects are a strong signal that the target should be canonical, while 302 and 307 are a weak signal (redirects and Google Search). A chain that includes a temporary hop leaves Google less certain which URL you want indexed. Google does not document a fixed loss of link value per hop; the risk is that signals consolidate less cleanly, or not at all if a hop breaks.
  • Other crawlers. Our view: not every bot is as patient as Googlebot. Our own audit stops after five hops and reports the page as unreachable, and AI crawlers and link checkers may give up sooner.

301, 302, 307 and 308: which to use

Code Meaning Request method kept? How Google treats it
301 Moved permanently Not guaranteed; older clients switch POST to GET Strong signal the target is canonical
308 Permanent redirect Yes Same as 301
302 Found (temporary) Not guaranteed Weak signal the target is canonical
307 Temporary redirect Yes Same as 302

Use 301 or 308 for anything permanent: HTTPS, host changes, retired URLs, migrations. The difference between them matters for form submissions and APIs, where a 308 guarantees the method and body are preserved (MDN on 308). Use 302 or 307 only when the original URL will come back, such as a temporary campaign page. Google says an instant meta refresh is treated as a permanent redirect and JavaScript redirects should be a last resort, because rendering can fail. The 301 vs 302 redirect entry covers the choice in more detail.

How to find redirect chains

  1. Test the obvious variants. Enter http://, non-www (or www), uppercase, no-trailing-slash and index.html versions of your home page and top landing pages into the redirect checker. Each should reach the final URL in one hop.
  2. Test old URLs. URLs from previous migrations still attract links. Run a sample from old sitemaps or analytics through the checker.
  3. Crawl internal links. A crawl with the website audit tool lists internal links that hit a redirect. Internal links should point straight at final URLs.
  4. Check your sitemap. It should contain only URLs that return 200. The sitemap checker flags entries that redirect.
  5. Check canonical and hreflang tags. They should also point at final URLs; the canonical checker shows where each one resolves.
  6. Read Search Console. The Page indexing report lists redirect errors, and Settings → Crawl stats shows the share of requests that returned a redirect. The Search Console audit walkthrough covers both.

The free audit also reports the chain in front of any URL you test: no redirects or a single permanent one passes, a single temporary redirect is a notice, and two or more hops is a warning.

How to fix a chain

The method is the same on every platform:

  1. Map each starting URL to its final destination.
  2. Change the older rules so they point straight at the final URL, instead of at a URL that redirects again.
  3. Combine protocol and host redirects into one rule, so http://example.com goes to https://www.example.com in a single hop.
  4. Update internal links, canonical tags, hreflang annotations and sitemaps to use final URLs.
  5. Keep the redirects themselves in place. Google says to keep them as long as possible, generally at least a year.

Apache

In .htaccess or the virtual host, one rule can handle both HTTPS and the www host:

RewriteEngine On
RewriteCond %{HTTPS} off [OR]
RewriteCond %{HTTP_HOST} !^www\.example\.com$ [NC]
RewriteRule ^(.*)$ https://www.example.com/$1 [L,R=301]

Redirect 301 /old-page https://www.example.com/new-page

If the server sits behind a load balancer or CDN that terminates TLS, %{HTTPS} may always be off, which causes a loop. Check the X-Forwarded-Proto header instead.

Nginx

Send every non-canonical host and protocol to the final URL in one return:

server {
  listen 80;
  server_name example.com www.example.com;
  return 301 https://www.example.com$request_uri;
}

server {
  listen 443 ssl;
  server_name example.com;
  # ssl_certificate and ssl_certificate_key here
  return 301 https://www.example.com$request_uri;
}

For individual URLs, use location = /old-page { return 301 /new-page; }, or a map block for long lists.

Cloudflare

Cloudflare offers single redirect rules for patterns and bulk redirects for long lists of URLs. The common chain on Cloudflare-fronted sites is a Cloudflare HTTPS rule followed by an origin rule that adds www. Move both into one Cloudflare rule that sends the request to https://www. in a single hop, and remove the duplicate at the origin. Bulk redirects need proxied DNS records to take effect.

WordPress

WordPress redirects changed post slugs automatically and adds or removes trailing slashes to match your permalink structure. Chains usually come from a redirect plugin whose old rules point at URLs that were later redirected again, or from host-level and plugin-level HTTPS rules running one after the other. Export the plugin’s rules, find targets that themselves redirect, and point them at the final URL. The WordPress SEO audit covers permalink changes.

Shopify

Shopify only lets you redirect URLs that return a 404, and it creates a redirect when you change a product or collection handle if you leave that option ticked. Several handle changes in a row leave a chain. Edit the older redirects so they point at the current handle, or export them as CSV, fix the targets and re-import. The Shopify SEO audit explains the platform’s other limits.

What to do next

  1. Run your home page’s http:// and non-www variants through the redirect checker and fix any that take more than one hop.
  2. Update internal links, canonicals and sitemaps to final URLs.
  3. Re-test a sample of old URLs from your last migration.
  4. Run the free audit to check the redirect chain alongside the rest of the technical checks, and the technical SEO checklist for everything else at the crawl level.

Frequently asked questions

How many redirects is too many?
One is normal. Google advises redirecting straight to the final URL and, where a chain cannot be avoided, keeping it to ideally no more than three hops and fewer than five. Google's crawlers follow up to ten hops; other crawlers and tools may give up sooner.
Do redirect chains hurt SEO?
They slow crawling, add latency for visitors and make it easier for a temporary hop or a broken step to send mixed signals about which URL is canonical. A single chain on a minor page is harmless; chains on your main host, protocol or navigation links affect every visit.
Should I use 301 or 308 for permanent redirects?
Google treats them the same way. The difference is for clients: a 308 guarantees the request method and body are kept, which matters for form posts and APIs. For ordinary page moves either works; 301 is the conventional choice.
How long should I keep a redirect in place?
Google's site move guidance says to keep redirects as long as possible, generally at least a year. Keeping them longer costs little and protects links from other sites that will never be updated.
Is a redirect loop the same as a redirect chain?
No. A chain eventually reaches a page. A loop sends the request back to a URL it already visited, so it never resolves and browsers show an error such as too many redirects. Loops are urgent; the page is unreachable.