RankDossier
Check family

Redirect problems: chains, loops and temporary redirects

A redirect sends visitors and crawlers from one URL to another. Problems appear when the http version or the www host does not redirect, a permanent move uses a temporary code, a chain needs several hops, or a loop never ends. Point every old address straight to its final https address with one permanent redirect, and update internal links so they no longer need it.

How the problem happens

Chains grow when redirects are added on top of older ones, for example after a redesign, a switch to https and then a new URL structure. Each step is correct on its own, but nobody removes the middle one.

Why redirect problems hurt rankings and AI visibility

A redirect is a promise that a page moved, and search engines act on the type of promise you make. A permanent redirect (301 or 308) tells them to replace the old address with the new one in the index and to carry its signals over. A temporary one (302 or 307) says the move is short-lived, so the old address may stay indexed. Using the wrong type, or none at all for the http and www variants, leaves two or more versions of your site competing with each other.

Chains and loops add a second cost. Every extra hop is another request before the content arrives, which slows the first byte for people and uses crawl budget for bots; crawlers also stop following after a limited number of hops, so the end of a long chain may never be fetched. A loop never ends at all. AI assistants that fetch a page live may also fail on slow or broken paths, and an index full of intermediate addresses gives them wrong URLs to cite.

How to find redirect problems by hand

Test the variants of your own home page: http://example.com, http://www.example.com, https://www.example.com and https://example.com. Exactly one should answer 200, and the other three should reach it with a single permanent redirect. The command below follows every hop and prints how many there were and where the request ended.

Then test the pages that matter: old campaign addresses, URLs from before a redesign, and the top landing pages in your analytics. A browser hides chains because it only shows the last page, so read the status codes directly, or use the Network panel with “Preserve log” switched on. Warning signs are a 302 where the move is final, two or more hops, a hop that goes back to a host you already visited, and a page whose only content is a <meta http-equiv="refresh"> tag.

Finally, look at your own links. Open a crawl export and list internal links whose target answers 3xx. Each one is a hop you created yourself, and each is easy to remove.

# follow every hop and print each status line and Location header
curl -s -I -L http://www.example.com/old | grep -i -E '^(HTTP|location)'

# expected: one 301 hop to https://example.com/new, then a 200

How to fix redirects in code, server and CMS

Decide the single preferred address first: protocol, host and trailing-slash style. Enforce it once, at the outermost layer, with one rule: any other host or http request is sent with a permanent redirect straight to the preferred https address, keeping the path and query. Do not stack this on top of a rule in the CMS or the CDN, because each layer adds a hop.

For moved pages, keep a table of old address to final address and write each row as one redirect. When a destination itself moves later, edit the old rows to the newest target instead of adding a new row at the end of the chain. Use 301 or 308 for permanent moves and reserve 302 or 307 for real temporary cases such as a short maintenance page or an A/B test.

Then remove the cause of the traffic through redirects: update internal links, the sitemap and canonical tags to the final address, and replace meta refresh with a server-side status code, since a header is faster and unambiguous. Never redirect everything to the home page; send each old page to its closest equivalent, or return 404 or 410 when there is none.

How RankDossier detects redirect problems

RankDossier requests the http version and the other host variant of your site and reports when they do not reach the preferred https address, or reach it by a temporary redirect or through more than one hop. During the crawl it follows the redirects of every page and flags chains, loops, pages that use a meta refresh, internal links that point at a redirect and links that use the other host variant.

Each finding lists the start address, the hops that were observed and the final address, so you can rewrite the first rule rather than guess. For a quick single-address test use the redirect checker. The guide to broken links and redirects explains the wider cleanup, the site migration guide shows how to map old URLs to new ones before a launch, and the internal links guide covers updating links so they stop depending on redirects.

Wrong and right

Wrong

/old  ->  301 /interim  ->  301 /new   (two hops)
/old  ->  301 /new   (one hop)

How to fix it

WordPress

List every old address and redirect it straight to its final page with one permanent rule in your redirect or SEO plugin, then fix internal links and the Site Address setting.

Next.js

Declare each move once in the redirects function of next.config.js with permanent set to true, and point it at the final destination rather than an earlier redirect.

// next.config.js
module.exports = {
  async redirects() {
    return [{ source: '/old', destination: '/new', permanent: true }];
  },
};

Nginx

Use one return 301 per old address, written to the final address, and keep one server block that sends http and the other host to the preferred https host.

location = /old {
  return 301 /new;
}

Check codes in this family

These checks belong to this family. Each code appears in the audit report with its own explanation and fix.

  • HTTP_NOT_REDIRECTED HTTP does not redirect to HTTPS
  • HOST_NOT_NORMALIZED www and non-www are not unified
  • REDIRECT_NOT_PERMANENT Temporary redirect instead of permanent
  • REDIRECT_CHAIN_VARIANT Redirect chain on the main address
  • PAGE_REDIRECT_CHAIN Redirect chains
  • PAGE_REDIRECT_LOOP Redirect loop
  • META_REFRESH Meta refresh redirect
  • LINK_TO_REDIRECT Internal links to redirects
  • LINK_HOST_VARIANT Internal links to another host variant

Read the full guide Broken links and redirects: find and fix each 404 and redirect chain for the wider picture. Test one page for free with the Redirect checker.

Check your own site

Enter a domain – the free pre-check reads up to 10 pages and shows how many types of problems it finds. You pay only if you want the full report.

Start the free pre-check