Technical SEO
How to set up redirects for a site migration
Crawl every URL currently returning 200, map each to its closest equivalent on the new site, and deploy them as single-hop 301s before anything else changes. A missing redirect map is the one migration mistake that is not recoverable.
Before you start
- A crawler
- Access to both the old and new sites
- Search Console data export
The steps
-
Step 1: Crawl the old site completely
Export every URL returning 200. This list is the migration.
-
Step 2: Export supporting data
Search Console performance for 16 months, current rankings for your top terms, and the backlink profile.
-
Step 3: Map old to new
Each old URL to the closest equivalent. Where none exists, decide deliberately: closest parent, or 410.
-
Step 4: Never map en masse to the home page
Google treats that as a soft 404, which discards exactly the equity you were preserving.
-
Step 5: Implement as single-hop 301s
No chains. http → https → www → final is three hops doing one job.
-
Step 6: Test against the full export
Every old URL, not a sample. Confirm each resolves in one hop to the intended destination.
-
Step 7: Deploy redirects with the new site
Not afterwards. The gap between launch and redirects is where traffic is lost.
-
Step 8: Monitor for 90 days
Coverage weekly, 404 logs weekly, and your recorded rankings against the baseline.
Keep them for at least a year
Removing redirects at six months undoes the migration. Search engines need repeated confirmation, and external links pointing at old URLs do not update themselves.
The special case that is trivial
Migrating off a site with no rankings, no traffic and no links. There is nothing to preserve, so move immediately — the cost only rises as more cards, invoices and profiles carry the old address.
The background behind this
Migrating a site without losing what it took years to earn covers the reasoning in about 3 minutes — free, ungated, written from client work.
Who wrote this
Anas Bin Masud builds e-commerce sites and does technical SEO for businesses in the UK, Canada, Ireland and Pakistan. These procedures are the ones I run on client work, written down rather than invented — including the ones where the honest answer is that the fix is not available on your current hosting.