ezomfy
All posts
July 4, 20265 min read

The redirect map that protects your rankings in a migration

The one piece of migration work that decides whether you keep your traffic. Where the URL list comes from, the four mapping rules, and why redirecting to the homepage fails.

A

Ashraful

Shopify Select Partner

A vintage compass and navigation instrument on an old map, showcasing precision tools for exploration. — Photo by Alex Andrews on Pexels

If a migration is going to lose you traffic, this is where it happens.

Everything else in a platform move is recoverable. Products import wrong, you re-import. The theme is not quite right, you fix it. But if your URLs change and nothing tells Google where they went, you lose rankings you spent years building, and getting them back is slower and more expensive than earning them the first time.

This is the piece of work that prevents it. It is not complicated. It is just tedious, and tedious work is what gets cut when a project runs late.

What a redirect map is, in plain terms

Your old store had URLs. Google knows them, ranks them, and sends people to them. Other sites link to some of them.

Your new store has different URLs, because platforms structure them differently and there is no way around that.

A redirect map is the list that connects every old URL to its new equivalent, and tells Google the move is permanent so it should transfer the ranking rather than start over.

That last part is the whole point. A 301 redirect says "this moved permanently, bring the ranking with you." A 302 says "temporarily elsewhere, keep indexing the old one." A 404 says "gone, forget it."

Use the wrong one and you have technically redirected while throwing away the value.

Where the list comes from

Not your sitemap. This is the mistake that quietly ruins migrations.

Your sitemap contains the URLs you currently publish. It does not contain the product you discontinued in 2023 that still ranks for a phrase people search, the old blog post that earned a link from a publication, or the category page you removed from the navigation but which Google still sends traffic to.

The list you want is Search Console, Performance report, Pages tab, last 16 months, exported. That is every URL that has actually received an impression. It is the record of what Google thinks your site is.

Export it before you decommission anything. Once the old platform is gone, so is the ability to check what you had. We have taken over stores where this was skipped and the honest answer to "what used to rank" was "nobody knows now."

Second list, worth pulling: your top linked pages, also from Search Console. A page with external links carries value beyond its own traffic, and losing it wastes someone else's endorsement of you.

The mapping rules

Work through the export, highest impressions first. Four rules cover almost everything.

One to one where it exists. A product that still exists goes to that product. A category goes to the equivalent collection.

Closest relevant parent when it does not. Discontinued product goes to its collection, not the homepage. A retired blog post goes to the post that replaced it, or the blog index. The test is whether a person landing there finds something useful. If they would immediately bounce, it is the wrong destination.

Never blanket-redirect to the homepage. This is the most common shortcut and it does not work. Google treats a mass redirect to the homepage as a soft 404 and discards the ranking, so you have done the work and got the outcome you were avoiding. Worse, the customer who clicked a specific product lands on your front page and leaves.

Genuinely dead content gets a real 404. If a URL has no equivalent and no useful parent, let it 404 honestly. A clean 404 is better than a misleading redirect, and Google handles it fine.

The mechanics on Shopify

Shopify has redirects built in, under Online Store, Navigation, URL Redirects. For a handful you can add them by hand. For a few hundred you want the bulk CSV import, which takes two columns:

Redirect from,Redirect to
/product/blue-widget,/products/blue-widget
/product-category/widgets,/collections/widgets
/shop,/collections/all

Two constraints worth knowing before you build the file.

Shopify's redirects are exact path matches, not patterns. You cannot write a rule that says "everything under /product-category/ goes to the matching collection." Each one is a row. This is why the file gets long and why the work is tedious rather than clever.

Query strings are matched too, which matters if your old platform used them. WordPress /?p=1234 style URLs each need their own row.

If your old URLs came from WordPress, the common shapes are predictable and you can generate most of the file:

/product/{handle}            ->  /products/{handle}
/product-category/{slug}     ->  /collections/{slug}
/shop/                       ->  /collections/all
/?p={id}                     ->  the specific product or post
/wp-content/uploads/{file}   ->  the Shopify CDN URL

Generate the bulk of it, then check the top 50 by impressions by hand. Those 50 are most of your traffic and they are the ones worth a human's judgement.

Testing, before and after

Before the DNS switch, take your top 100 URLs and check each one resolves to something sensible on the staging store. Not "returns 200", but "lands on the right page." A redirect to the wrong collection returns 200 and is still wrong.

After the switch, check status codes rather than trusting the browser:

curl -sI https://yourstore.com/product/blue-widget | head -1
# want: HTTP/2 301

Then follow it and confirm the destination is a real page, not a 404 wearing a redirect.

What to expect afterwards

Rankings dip for two to three weeks. That is normal. Google has to recrawl, follow the redirects, and reassociate the ranking with the new URL, and it does not do that overnight for a whole site.

The dip should recover. Here is the schedule we hold clients to:

  • Week 1: submit the new sitemap in Search Console. Watch the Pages report for a spike in 404s, which means a redirect is missing.
  • Week 2 to 3: expect the dip. Do not change anything yet.
  • Week 4: if traffic has not started climbing back, something is wrong with the map. Pull the Search Console 404 list and check it against your redirect file.
  • Week 8: should be at or above where you were. If it is not, the problem is not patience.

Keep the old platform running but unpublished for a fortnight. It costs one more month of hosting and it is the difference between checking what a URL used to do and guessing.

What this looks like when it is skipped

A store we later took over had migrated the previous year with no redirect map. Thirty old URLs, every one returning 404, still receiving impressions in Search Console months later. Google was still trying to send that store customers and the store was turning every one of them away at the door.

The fix took an afternoon. The lost year did not come back.


Every migration we run includes the redirect map as a defined step with its own day, built from the Search Console export rather than the sitemap, and tested before the DNS switch. We migrate from WooCommerce, Magento, BigCommerce, Squarespace, Wix, and Kajabi.

Planning a move? Book a 30 minute call and we will tell you what your current URL footprint looks like before you commit to anything. Already migrated and lost traffic? The free audit will find the 404s.

A

About the author

Ashraful

Shopify Select Partner, Top Rated Plus on Upwork. 700+ Shopify projects shipped over 7+ years: themes, apps, migrations, speed, Hydrogen. Solo shop, no agency middlemen.

Read the full story

Working on a Shopify project?

That's what I do every day. Pick whichever feels lower-friction.