Redirect chains after a site migration
Migrations often leave old URLs bouncing through several redirects. Here's how to find the chains and point every old URL straight to its final page.
A redirect chain is when one URL redirects to another URL that redirects again before reaching the final page. After a migration, chains are common because new redirects get stacked on top of old ones. The fix is to point every old URL directly to its final destination in one hop, update internal links and sitemaps to the final URLs, and keep the redirects in place for a long time. Google's crawlers follow up to 10 redirect hops by default (Google Search Central). Every extra hop still costs time for users and crawlers, so one hop is the goal.
How chains build up
Most chains aren't designed. They pile up over years. A typical example:
http://example.com/services.html- →
https://example.com/services.html(HTTPS move) - →
https://www.example.com/services.html(www rule) - →
https://www.example.com/services/(new URL structure) - →
https://www.example.com/what-we-do/(later rename)
Each redirect made sense when it was added. Together they turn one click into four extra requests.
Common causes:
- Layered global rules. Protocol, host and trailing-slash rules each fire in turn.
- Migration on top of migration. The new redirect map points old URLs to URLs that were themselves later redirected.
- CMS slug changes. Some platforms add a redirect each time a slug changes, so edited pages build their own chains.
- Plugins and the server both redirecting. A rule in the CMS and a rule at the server or CDN don't know about each other.
Why chains are a problem
- Speed. Each hop is a full round trip before the page can start loading. On mobile networks, that adds up.
- Crawling. Each hop is another request for Googlebot. On large sites, this wastes crawling that could go to real pages.
- Lost hops. If any hop in the chain breaks, returns a 404 or loops, the whole path fails.
- Signals. Google advises using permanent redirects when a page moves for good, so it shows the new URL (Google Search Central). A chain that mixes temporary and permanent redirects sends a muddled message.
Prevent chains before launch
The cheapest chain to fix is the one you never create. When I build a redirect map for a migration, I follow a few rules.
Map to the final URL, not the next one
Before launch, run every redirect target through the same check you'd use for old URLs. A target that is itself redirected means the map is out of date. This catches pages that were renamed again during the build.
Map one to one where you can
Each old page should go to the new page that best matches it. Sending many old pages to the home page doesn't help users find what they clicked for. If a page has no equivalent, a 404 or 410 can be more honest than a redirect to something unrelated.
Keep one source of truth
Store the map in one place: a spreadsheet or a config file in version control. Generate server or CDN rules from it. When redirects live in the CMS, a plugin, the server and the CDN at once, nobody can see the full path a URL takes.
How to find chains
1. Build the list of old URLs
Your best sources:
- The old XML sitemaps.
- A crawl of the old site, if you saved one.
- Top landing pages from analytics before the migration.
- Pages with backlinks, from your backlink tool.
- URLs from Search Console's Performance report before the move.
2. Crawl the list
Load the old URLs into a crawler in list mode and enable redirect chain reporting. Screaming Frog, for example, can export every chain with each hop and its status code.
3. Spot-check with curl
For a single URL, curl shows every hop:
curl -sIL https://example.com/old-page | grep -iE "^(HTTP|location)"
Each HTTP/ line is a hop. More than one redirect status before the final 200 means a chain.
4. Check internal links too
Crawl the new site and look for internal links that point to redirecting URLs. These are easy to fix and save a hop on every click.
How to fix them
Flatten the redirect map
For each old URL, find its final destination and redirect straight to it. If A redirects to B and B redirects to C, change both so A → C and B → C. Keep this as a single mapping table (old URL, final URL, status) rather than rules spread across the CMS, server and CDN.
Merge global rules into one hop
Combine protocol, host and trailing-slash normalization so http://example.com/page goes to https://www.example.com/page/ in one redirect, not three. Most servers and CDNs can do this in a single rule.
Use permanent redirects for permanent moves
Use 301 or 308 for pages that have moved for good (Google Search Central). Save 302 and 307 for moves that really are temporary.
Update everything that points to old URLs
- Internal links in content, menus and footers.
- Canonical tags.
- XML sitemaps, which should list only final 200 URLs.
- hreflang annotations.
- Important backlinks, where you can contact the linking site.
Keep the redirects
Google's site move guide says to keep redirects for as long as possible, and generally at least one year (Google Search Central). I keep migration redirects much longer when the old URLs still get traffic or links.
A post-migration checklist
- Crawl every old URL. Each one should reach a 200 page in one hop.
- No redirect should point to a 404, a redirect or a non-canonical URL.
- The new site's internal links shouldn't point to redirects.
- Sitemaps should list only final URLs.
- Re-run the check after every major release. Chains come back when nobody watches.