Changing a store’s URLs without losing its rankings
A decade-old store carries its history in its URLs. Inventory every address, map each to one clean new one, apply in the database, test every redirect. The plan we use.
A store that has been online for a decade carries its history in its URLs. Categories renamed, products moved, a migration from one platform to another, an SEO agency that changed the structure twice. Each change created a new set of addresses, and each old address still has links and search rankings pointing at it. Change the URLs again without a plan and the rankings go with them. Here is the plan we use.
Why URL changes hurt
Search engines rank pages, and a page is its address. When the address changes, the new page starts from zero unless something tells the search engine that it is the same page. That something is a permanent redirect from the old address to the new one, and it has to be in place from the minute the new address goes live. Every day without it is a day the old page loses rank and the new one has not yet earned any.
Magento makes this harder than it should. It generates its own rewrites for every product and category, and the behaviour depends on settings that are easy to change by accident. Saving a category in the admin with the wrong option ticked can regenerate thousands of URLs and quietly drop the redirects that were protecting the old ones.
Our rules for a URL change
- Inventory first. Export every URL the store currently serves, from the sitemap, the rewrite table and the search console. The search console matters most: it lists addresses that still get impressions, including ones the store forgot it ever had.
- Design the new structure once. Clean, short, no category path baked into product URLs, no duplicate categories reachable at two addresses. If the catalogue needs restructuring to achieve that, restructure the catalogue. A tidy URL scheme on a messy taxonomy does not hold.
- Map every old address to one new address. One. A redirect chain, where A goes to B goes to C, leaks ranking at every hop and eventually gets ignored. Old addresses that have no equivalent go to the closest category, never to the home page.
- Apply the changes in the database, not the admin. On a store with multiple storefronts the admin save can regenerate rewrites for all of them, in ways that differ between stores. A scripted change to the rewrite table does exactly what the map says and nothing else, and it can be tested on staging and re-run on live.
- Switch off automatic regeneration for the duration, and leave it off if the catalogue is managed by an ERP or an import. The feature that helpfully rebuilds URLs is the feature that destroys the redirect map.
Testing before go-live
On staging we request every old address from the inventory and check that it returns one permanent redirect to the mapped new address, which returns a page. Not a chain, not a temporary redirect, not a soft 404. For a store with thousands of legacy addresses this is a script, not a person, and it runs again on live immediately after the change.
After go-live
The old sitemap is replaced, not left alongside the new one. The search console is told about the new sitemap and watched for crawl errors daily for the first fortnight. Impressions on the old addresses should fall as the new ones rise, with the total holding steady. If the total drops, something in the map is wrong and the inventory tells you where.
What this is worth
A store we are restructuring at the moment has over a thousand legacy addresses that still receive search traffic, accumulated across two platforms and several agencies. Every one of them will redirect to a clean new address on day one. That is the difference between a restructure that improves rankings and one that takes a year to recover from.
URL migrations are part of the Magento work we do, and the mapping discipline is the same on WooCommerce. If your store’s URLs have been changed before, the inventory step alone is usually revealing.
Got a similar problem? Talk to us.
Start a project