Dev.to WebDev šŸ›  Dev šŸ‘ 0 šŸ“– 2 min read

The 301 Redirect Map: The Step Most Website Migrations Skip

Most website migrations fail quietly. The new site launches, everything looks fine, and three weeks later organic traffic is down by half. The cause is nearly always the same. Old URLs changed, and nobody told Google wh

Most website migrations fail quietly. The new site launches, everything looks fine, and three weeks later organic traffic is down by half.

The cause is nearly always the same. Old URLs changed, and nobody told Google where they went.

What a redirect map is

A redirect map is a two-column sheet. Column one lists every URL on the old site. Column two lists the new URL replacing it. Each row becomes a 301 (permanent) redirect on launch day.

How to build one

  1. Crawl the old site with Screaming Frog or any crawler. Export every URL returning a 200 status.
  2. Pull the pages with clicks from Google Search Console (Performance, Pages tab, last 16 months). Some pages earn traffic with no internal links pointing at them, so a crawler misses them.
  3. Add every URL with backlinks. Any backlink tool lists them.
  4. Merge the three lists and remove duplicates.
  5. Map each old URL to its closest new equivalent, one to one.
  6. Write the rules for your server: .htaccess on Apache, a map file on Nginx, or the URL redirects screen on Shopify and other hosted platforms.

Four mistakes to avoid

  • Sending everything to the homepage. Google often treats a mass homepage redirect as a soft 404, and the old pages lose their rankings.
  • Redirect chains. A to B to C slows crawling. Point A straight to C.
  • Using a 302. A 302 is temporary. Use a 301 for a permanent move.
  • Removing redirects early. Keep them live for at least a year. Longer is better.

Example rules

Apache:

Redirect 301 /old-services/ https://example.com/services/

Nginx:

location = /old-services/ { return 301 https://example.com/services/; }

Test before and after launch

Before launch, run the old URL list against the staging site. Every row should return a 301 pointing to a page with a 200 status.

After launch, crawl the old list again. Then watch the Pages report in Search Console for new 404 errors over the next 30 days.

Want the full list?

We run this process on every move at eDeskCloud. For the complete pre-launch and post-launch steps, read our website migration SEO checklist. To hand the whole job over, see our website migration services.

šŸ“° Read the original article on Dev.to WebDev

Originally published by Dev.to WebDev. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.