Skip to content
AspirecoStart
All answers

Ecommerce

How do you build a 301 redirect map for a large online store?

The short answer

List every URL the old store served, give each the closest live destination on the new store, and verify the whole map against the new site before the DNS changes. Exact product matches redirect mechanically; everything else needs a destination a person has checked actually answers the old page.

Updated

Inventory every old URL

No single source lists them all: combine the old sitemap, a crawl, search console exports and server logs, because each misses something. The inventory is the job — a URL that is not on the list becomes a 404.

Match what you can mechanically

Products that exist on both sides should redirect straight to themselves, which needs stable identifiers. When Shopflooring moved off WooCommerce, over 23,000 of its 36,786 legacy URLs went straight to the same product, because the catalogue had already been matched on exact SKU.

Give the rest a real destination

The remainder go to a search result or brand page someone has checked the catalogue can answer. Sending everything to the homepage is worse than a 404, and search engines treat an irrelevant redirect as a soft 404 anyway.

Verify before the DNS changes

Once the record moves there is no old site to compare against. Run the map as a test suite against the new site on its pre-launch host: each old URL returns a 301, the destination matches, and the destination returns 200. Shopflooring's check came back 300 for 300 against production.

The full method is in the guide to replatforming a large catalogue.

Asked next

Should discontinued products redirect to their category?

Not by default. Mass-redirecting dead products to a parent category looks tidy but reads as a soft 404. If there is a close successor, redirect to it; if not, keeping the page live with a clear no-longer-available note and real alternatives is often better.

Should old URLs be blocked in robots.txt after the move?

No. A disallow stops crawlers fetching the old URL, so they never see the 301 and never pass its history to the new page. Leave the old paths crawlable, and keep the new sitemap to canonical URLs that return 200.