# Fix redirect chains

- Check 05.04 · HTTP and redirects · Critical
- Source: https://checklist-seo-geo.com/en/http-redirects/fix-redirect-chains
- Find redirects that follow one another, rewrite each rule so it targets the final URL directly, and align links and sitemap, on server, CDN or CMS.
- Updated on 2026-11-25
- Licence: CC BY 4.0. Credit “Checklist SEO & GEO” with a link to https://checklist-seo-geo.com/en/http-redirects/fix-redirect-chains.
- Plugin checklist-seo-geo: 1.3.1 · https://github.com/maximegaul/checklist-seo-geo

## In short

A redirect chain is a URL that redirects to another URL which in turn redirects: `http://example.com/page` → `https://example.com/page` → `https://www.example.com/page` → `https://www.example.com/page/`. This check consists of finding these chains and rewriting the rules so that every old address leads to the final URL in a single redirect. Once it is done, every redirect test shows one hop, not two or four.

## Why it matters

Each step in a chain is one more request for the browser and for the crawler. Google documents that its crawlers follow up to ten redirects by default; beyond that, Search Console reports a “Redirect error” and the page is not indexed. For a site move, Google advises redirecting straight to the final destination and, if that is not possible, keeping the chain to three redirects at most. Its crawl budget guide points out that long chains have a negative effect on crawling.

Chains have very ordinary causes:

- **Successive layers**: an HTTP-to-HTTPS rule, then a bare-domain-to-`www` rule, then a rule that adds the trailing slash, each one in a different tool.
- **Stacked migrations**: in 2021, `/a` redirects to `/b`; in 2024, `/b` redirects to `/c`. Nobody updated the first rule.
- **Imprecise target**: the rule targets `/nouvelle-page` while the site serves `/nouvelle-page/`, or `http://` while the site is on HTTPS.

For visitors, each hop adds a network round trip before the first byte of the page, which is noticeable on mobile.

## What it improves

- **Crawling**: one request per old URL instead of several. A noticeable effect on large sites and during migrations.
- **Indexing**: no more risk of the crawler giving up beyond the redirect limit.
- **Load time**: one or more network round trips fewer for anyone arriving through an old URL.
- **Third-party crawlers and generative engines**: crawlers that follow fewer redirects than Googlebot reach the final page. Their limit is usually not documented: a single hop is the only safe configuration.
- **Rankings**: no proven direct effect.

## How to check

Follow a URL's whole chain:

```bash
curl -sIL http://example.com/ancienne-page | grep -i -E "^(HTTP|location)"
```

Result to fix:

```txt
HTTP/1.1 301 Moved Permanently
location: https://example.com/ancienne-page
HTTP/2 301
location: https://www.example.com/ancienne-page
HTTP/2 301
location: https://www.example.com/nouvelle-page/
HTTP/2 200
```

Compliant result: a single `301` (or `308`) line, then `200`.

For a list of URLs (old addresses, URLs that receive backlinks, URLs from past sitemaps):

```bash
while read -r url; do
  curl -s -o /dev/null -L --max-redirs 10 -w "%{num_redirects};%{http_code};%{url_effective};$url\n" "$url"
done < anciennes.txt | awk -F";" '$1 > 1'
```

Only URLs with two redirects or more are displayed.

With Screaming Frog, enable `Configuration > Spider > Advanced > Always Follow Redirects`, crawl the site or a list, then open `Reports > Redirects > Redirect Chains`: for each starting URL, the report gives the number of hops and the final URL, and it also spots loops. In Search Console, the “Redirect error” reason in the [Page indexing report](https://search.google.com/search-console/index) lists the overly long chains that Google has encountered.

## How to implement

### Before you start

1. **Export every rule**: web server, CDN, redirect plugin, hosting panel, application. A chain almost always comes from two tools that ignore each other.
2. **Flatten the table**: for each rule, replace the target with the final destination. The following script does this on a `source,target` CSV and reports loops:

```python
import csv
import sys

regles = {}

with open(sys.argv[1], newline="", encoding="utf-8") as fichier:
    for source, cible in csv.reader(fichier):
        regles[source.strip()] = cible.strip()

ecrivain = csv.writer(sys.stdout)

for source in regles:
    vues = [source]
    cible = regles[source]

    while cible in regles:
        if cible in vues:
            print(f"Loop: {' -> '.join(vues + [cible])}", file=sys.stderr)
            break
        vues.append(cible)
        cible = regles[cible]

    ecrivain.writerow([source, cible, len(vues)])
```

```bash
python3 aplatir.py redirections.csv > redirections-aplaties.csv
```

The third column gives the length of the original chain. Sources and targets must be written the same way (paths only, or full URLs) for matches to be found.

3. **Write targets as full, final URLs**: `https://www.example.com/nouvelle-page/`, with the right scheme, the right host and the trailing slash the site actually serves.
4. **Group host redirects together**: HTTP to HTTPS and bare domain to `www` in a single rule. See [standardize HTTP/HTTPS and www/non-www](https://checklist-seo-geo.com/en/indexing-canonicalization/standardize-http-https-www-non-www).
5. **Update the links**: internal links, sitemap, canonical, hreflang and structured data must reference the final URL. A redirect should only serve visitors and crawlers coming from outside.

> **Warning:** do not delete the intermediate rules. `/b` must keep redirecting to `/c` for anyone who has a link to `/b`: you change the target of `/a`, you delete nothing.

### Apache

Versions: Apache 2.4.

In the `.htaccess` file, put the page redirects first, with an absolute and final target, then a single host rule that handles HTTP to HTTPS and bare domain to `www` at the same time:

```apache
RewriteEngine On

RewriteRule ^ancienne-page/?$ https://www.example.com/nouvelle-page/ [L,R=301]
RewriteRule ^actualites/(.*)$ https://www.example.com/blog/$1 [L,R=301]

RewriteCond %{HTTPS} off [OR]
RewriteCond %{HTTP_HOST} !^www\.example\.com$ [NC]
RewriteRule ^ https://www.example.com%{REQUEST_URI} [L,R=301]
```

In this order, `http://example.com/ancienne-page` reaches `https://www.example.com/nouvelle-page/` in one hop. In the reverse order, the host rule would run first and the request would take two hops.

`DirectorySlash`, enabled by default, adds a slash to real directories with a 301: target the URL with the slash directly. Behind a proxy that terminates HTTPS, test `%{HTTP:X-Forwarded-Proto}` instead of `%{HTTPS}`.

### Nginx

Versions: Nginx 1.18 and later.

Keep the host redirect in separate `server` blocks that redirect straight to the final URL with `$request_uri`, and write page redirects with an absolute target:

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

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

In these two blocks, an old page URL still takes two hops. To avoid this on the URLs that matter (those that receive backlinks), include the same redirect `map` in each block and test it before the host redirect:

```nginx
if ($nouvelle_url) {
    return 301 $nouvelle_url;
}
return 301 https://www.example.com$request_uri;
```

Nginx also adds a trailing slash with a 301 when the URL matches a directory. Reload with `sudo nginx -t && sudo systemctl reload nginx`.

### Cloudflare

Versions: Cloudflare dashboard (Redirect Rules, Bulk Redirects), all plans, November 2026.

A request receives only one redirect per pass: if a rule's target triggers another rule, the visitor makes two round trips. In [Redirect Rules](https://dash.cloudflare.com/?to=/:account/:zone/rules/overview) and [Bulk Redirects](https://dash.cloudflare.com/?to=/:account/bulk-redirects), write full targets (`https://www.example.com/nouvelle-page/`). Avoid doing the same host redirect both in Cloudflare and at the origin. For a Bulk Redirects list, flatten your source CSV file with the script, then update the list items.

### AWS

Versions: AWS console (CloudFront Functions, Application Load Balancer), November 2026.

On CloudFront, a redirect function that returns a relative path leaves the rest of the work to the origin, which sometimes adds a second redirect (slash, host). Always return an absolute URL in the `location` header. On an Application Load Balancer, combine the HTTP:80 listener rule and the host rule so that they target `https://www.example.com` directly.

### Plesk

Versions: Plesk Obsidian 18.0.

The “Preferred domain” and “Permanent SEO-safe 301 redirect from HTTP to HTTPS” options in the hosting settings can produce two hops for `http://example.com`. If your test shows this, disable them and replace them with the `.htaccess` block from the Apache section, or with the `server` blocks from the Nginx section in “Additional nginx directives”.

### cPanel

Versions: cPanel & WHM 110 and later, Jupiter theme.

In `Domains > Redirects`, check that no redirect targets a URL that is itself redirected. If “Force HTTPS Redirect” is enabled in `Domains > Domains` and a `.htaccess` rule also handles `www`, keep only the `.htaccess` rule that does both.

### Shared hosting

Open the `.htaccess` file at the root and find the rules stacked up by plugins and successive migrations. Merge the host rules into a single block, then apply the ordering rule from the Apache section. The “force HTTPS” checkboxes in hosting panels come on top of the `.htaccess` file: keep only one.

### WordPress

Versions: WordPress 6.4 to 7.1, Redirection plugin 5.x, WP-CLI 2.x.

- **Redirection or Rank Math plugin**: export the list as CSV, flatten it, then fix the targets in the interface or reimport. The plugin's log shows which old URLs are still requested.
- **Slug changes**: WordPress redirects a post's old slugs straight to the current address, with no chain. However, a manual redirect to a slug that has changed since creates one.
- **Site addresses**: `Settings > General` must contain the final URL (`https://www.example.com`), otherwise WordPress adds its own host redirect after the server's.
- **Internal links**: replace the old URLs in the content with Better Search Replace or `wp search-replace` (WP-CLI), after a backup.

### Shopify

Versions: Shopify admin interface, all plans, November 2026.

Export the redirects (`Content > Menus`, then `URL Redirects`, `Export` button), flatten the file, delete the redirects concerned and reimport the corrected version. A Shopify redirect that targets a URL that is itself redirected produces a chain; the primary domain is set in `Settings > Domains`.

### Laravel

Versions: Laravel 10 to 13.

Group redirects in a single middleware or a single routes file, with absolute targets built from `config('app.url')`. Check that the host redirect is not done both by the server and by a middleware.

### Next.js

Versions: Next.js 15 and 16 (App Router and Pages Router); Vercel dashboard, November 2026.

The `trailingSlash` option in `next.config.js` adds its own 308 redirect to the form with or without a slash. Write the `destination` values of your `redirects()` in that form, otherwise every redirect triggers a second one:

```js
module.exports = {
  trailingSlash: true,
  async redirects() {
    return [{ source: '/ancienne-page', destination: '/nouvelle-page/', permanent: true }];
  },
};
```

On Vercel, the domain redirect (bare domain to `www`) is set in `Project Settings > Domains`: do not duplicate it in `redirects()`.

## Common mistakes

- **Deleting the intermediate rule instead of changing the first one**: the middle URL, which may have links, ends up returning 404.
- **Relative or HTTP targets**: `/nouvelle-page` or `http://…` trigger the host or slash redirect right afterwards.
- **Leaving internal links on old URLs**: every visitor click and every crawler visit pays for a redirect. See [fix links to redirects or non-canonical URLs](https://checklist-seo-geo.com/en/internal-linking/fix-links-redirects-non-canonical-urls).
- **Testing only the “normal” starting URL**: also test the `http://`, non-`www`, no-slash and uppercase variants, which are the ones in old links.
- **Redirects at the CDN, the server and the CMS**: each layer adds its own. A single layer should decide.
- **Keeping redirected URLs in the sitemap**: see [exclude redirects, errors and noindex pages](https://checklist-seo-geo.com/en/crawling/exclude-redirects-errors-noindex-pages).

## Frequently asked questions

### How many successive redirects does Google follow?

Google states that its crawlers follow up to ten successive redirects by default. Beyond that, Search Console reports a redirect error and the page is not indexed. For a site move, Google recommends redirecting straight to the final destination, or at worst not exceeding three redirects. Other crawlers, including those of AI assistants, may follow fewer: aim for a single hop.

### Is a chain of two redirects serious for SEO?

A chain of two redirects does not prevent indexing by Google, but it doubles the requests needed to reach the page, slows down visitors who arrive through the old address and exposes you to crawlers that follow fewer hops. It is a cheap fix: change the target of the first rule so that it points to the final URL, without deleting the intermediate rule.

### How do I find all the redirect chains on a site?

Gather the URLs likely to be requested: old addresses, URLs that receive backlinks, URLs from old sitemaps and from previous versions of the site. Test them with curl while counting redirects, or in list mode in Screaming Frog with the Redirect Chains report. Complete the picture with the “Redirect error” reason in Search Console's Page indexing report.

### Should I delete old redirects to break a chain?

No. To break a chain from A to B to C, change rule A so that it targets C directly, and keep the rule from B to C: links, bookmarks or AI assistant answers may still cite B. Deleting an intermediate rule turns that URL into a 404 error and loses the links that pointed to it.

## Resources

- [Google Search Central: HTTP status codes and redirects](https://developers.google.com/crawling/docs/troubleshooting/http-status-codes?hl=en)
- [Google Search Central: Site moves with URL changes](https://developers.google.com/search/docs/crawling-indexing/site-move-with-url-changes?hl=en)
- [Google Search Central: Managing your crawl budget](https://developers.google.com/crawling/docs/crawl-budget?hl=en)
- [Search Console Help: Page indexing report](https://support.google.com/webmasters/answer/7440203?hl=en)
- [Cloudflare: Bulk Redirects](https://developers.cloudflare.com/rules/url-forwarding/bulk-redirects/)
- [Next.js: trailingSlash](https://nextjs.org/docs/app/api-reference/config/next-config-js/trailingSlash)

Next steps: [fix redirect loops](https://checklist-seo-geo.com/en/http-redirects/fix-redirect-loops) and [standardize letter case and trailing slashes](https://checklist-seo-geo.com/en/architecture-navigation/standardize-letter-case-trailing-slashes).
