Ecommerce URL Migration: How to Preserve Search Visibility
How to migrate ecommerce URLs: URL inventory, old-to-new mapping, 301 redirects, chains and loops, canonicals, internal links, sitemaps and 404 monitoring.
Quick answer
To preserve visibility when ecommerce URLs change, build a complete inventory of old URLs from crawls, sitemaps, analytics, Search Console, logs and backlinks; map each to the most relevant new URL; implement permanent (301 or 308) redirects that go directly to the final destination with no chains or loops; update internal links, canonicals and sitemaps to the new URLs; test before and at launch; and monitor 404s and redirect hits afterwards. Redirect discontinued items to close alternatives, not the homepage.
URL Migration Within the SEO Migration
URL migration is the most mechanical and most error-prone part of an SEO migration. Thousands of rules, each small, add up to large effects on traffic if wrong. This article goes deep on URL inventory, mapping and redirect implementation. For the broader SEO workstream, see ecommerce SEO migration.
Step 1: Build the URL Inventory
No single source lists every valuable URL. A crawl finds linked pages; sitemaps list what the old platform exposed; analytics and Search Console show pages that received visits and impressions; server logs show what bots and users actually requested; backlink tools show externally linked URLs; the platform export lists products and categories, including some that aren't linked. Combine them and deduplicate.
| Source | Finds |
|---|---|
| Site crawl | Linked pages, status codes, canonicals |
| XML sitemaps | Pages the platform exposed |
| Analytics landing pages | Pages with visits |
| Search Console | Pages with impressions and clicks |
| Server logs | Requested URLs, including old ones |
| Backlink data | Externally linked URLs |
| Platform export | All products and categories, incl. unlinked |
Step 2: Map Old to New
Map each old URL to its closest new equivalent. Use IDs and SKUs from the data migration to match products automatically, then review categories and content manually. Prioritize by value: pages with traffic, revenue or backlinks need careful matches. Keep the mapping in a spreadsheet or database that becomes the redirect source.
| Old URL type | Map to |
|---|---|
| Product | Same product's new URL |
| Product variant URL | Product URL (with variant if supported) |
| Category | Equivalent collection or category |
| Filtered category | Filtered equivalent if indexable, else category |
| Discontinued product | Replacement or category |
| Content page | Equivalent page or post |
| Search result pages | Usually not redirected individually |
Thousands of URLs to redirect?
ZSpace builds URL inventories, automated mappings and tested redirect rules for ecommerce migrations.
Step 3: Implement Redirects
Use permanent redirects (301 or 308) for URLs that have moved for good. Implement them at the server, CDN or platform level, not with client-side scripts. Where URL changes follow patterns (for example /product/sku-123 to /products/sku-123), pattern rules reduce the number of rules, but explicit rules are safer for high-value URLs. Check platform limits on the number of redirects and on pattern support.
old_path,new_path,type
/product/blue-linen-shirt,/products/linen-shirt-blue,301
/category/mens/shirts,/collections/mens-shirts,301
/product/discontinued-sneaker,/collections/sneakers,301
/about-us.html,/pages/about,301Step 4: Remove Chains and Loops
Stores that have migrated before often have old redirects. When new redirects are added on top, chains appear: A redirects to B, which now redirects to C. Flatten them so every old URL redirects directly to its final destination. Test for loops (A to B to A). Google recommends avoiding chains; they slow users and waste crawling (Google Search Central).
- Import historical redirects into the mapping
- Resolve every source to its final destination
- Detect loops before launch
- Ensure destinations return 200, not another redirect
- Re-run the check after any bulk change
Step 5: Parameters, Case and Trailing Slashes
Small URL variations cause missed redirects: uppercase letters, trailing slashes, index.html suffixes, tracking parameters. Decide how each should be handled and test representative cases. Check how your platform matches redirects when query parameters are present.
Step 6: Canonicals, Internal Links and Sitemaps
New pages should have self-referencing canonicals on their final URLs. Update internal links (navigation, content, product descriptions) to point directly at new URLs. Sitemaps should list only final, indexable URLs, never redirected ones. See SEO migration for the wider checks.
Step 7: Test
Test the redirect map automatically: request each old URL and check that it returns a single permanent redirect to the expected destination, which returns 200. Test before launch where the platform allows (for example on a staging domain) and again immediately after launch for the full list, starting with the highest-value URLs. See migration testing.
for old, expected in redirect_map:
r = http_get(base + old, follow_redirects=False)
assert r.status in (301, 308), old
assert r.location == base + expected, (old, r.location)
final = http_get(r.location, follow_redirects=False)
assert final.status == 200, (expected, final.status)Step 8: Monitor
After launch, monitor 404s (from server logs, analytics or platform reports) and add redirects for valuable URLs you missed. Watch Search Console crawl and indexing reports and organic traffic for mapped pages. Keep redirects for as long as possible; Google suggests at least a year, and permanent retention is common for ecommerce URLs with backlinks.
URL Migration to Shopify
Shopify uses fixed URL prefixes (/products/, /collections/, /pages/, /blogs/) and supports URL redirects created in the admin or imported in bulk by CSV. Plan for these structures early, since they determine most mappings. See Shopify migration.
Managing Large Redirect Maps
Stores with tens of thousands of URLs need structure: generate mappings automatically from ID matches, review only exceptions and high-value URLs manually, store the map in version control, and run the test suite on every change. Keep a record of why unusual mappings were chosen so later teams don't undo them.
- Automatic matching by ID or SKU
- Manual review for top URLs and exceptions
- Redirect map in version control
- Automated tests on each change
- Notes on unusual decisions
Worked Example
An illustrative scenario, not a client case: during a replatform, a store's redirect import sends all old category URLs through a legacy rule to an intermediate path, then to the new collection, creating two-hop chains for thousands of URLs. A pre-launch test run flags the chains; the team flattens the map so each old URL points straight to its final collection and re-runs the tests.
Common Mistakes
- Inventory from one source only
- Bulk redirects to the homepage
- Chains from previous migrations
- Untested pattern rules
- Internal links left pointing at old URLs
- Redirects removed too soon
Ready to migrate URLs without losing visibility?
Talk to ZSpace about redirect mapping and implementation, Shopify URL migrations and post-launch monitoring.
Conclusion
URL migration protects visibility through a complete inventory, careful mapping, direct permanent redirects, clean internal links and sitemaps, automated testing and ongoing 404 monitoring. Related: migration checklist and launch plan.
Common questions
Changing the addresses of pages, for example when moving platforms, restructuring categories or changing domains, while redirecting old URLs so users and search engines reach the right new pages.