
Moving an online shop to a new platform is like moving house: the furniture arrives, but if you don't leave your new address with the postman, the post vanishes into the void. For an e-commerce site the post is the customers arriving from Google, and the postman is the URLs. The postman, by the way, never asks for directions.
Every page that is already indexed is a small family heirloom. If after the migration it answers 404, Google knocks for a while, then takes offence and leaves. Taking with it the traffic it used to bring. My cousin moved house without telling anyone: he still gets the leaflets from his old supermarket. Only those. Not the bills, though: the bills found him straight away.
1. Inventory first
You don't start from the new site, which is pretty and shiny. You start from the old one, which is ugly but brings in the money. You need the complete list of the addresses that matter:
- Search Console: the pages that are indexed and the ones that get clicks.
- Sitemap and server logs: what Googlebot actually visits, not what we think it visits.
- External links: pages linked from other sites count double. They're the relatives who put in a good word for you: you don't lose touch with them.
2. The redirect tablet
For every old URL, a fate is decided. Technically it's a spreadsheet. I treat it like a stone tablet: anyone who changes it without saying so brings cakes for the whole office.
- Is there an equivalent? 301 to the most similar new page, not to the home page. Sending everything to the home page is like answering “the Town Hall” to someone asking where the births and deaths office is.
- The product no longer exists and has no replacement? 410: “gone, stop looking for it”. It's more honest than a 404 and Google usually gets it sooner.
- Never chain redirects: from A you go straight to C, without dropping by B to say hello.
If you can, keep the slugs identical language by language: the redirect becomes almost an identity and the errors drop by themselves.
# quick check of a list of URLs
while read u; do
curl -s -o /dev/null -w "%{http_code} %{redirect_url} $u\n" "$u"
done < vecchie_url.txt
I launch this command with the solemnity of a space mission test. It returns a column of numbers. If they're all 301s and 200s, I applaud on my own, in silence, in the room.
3. Freeze the catalogue
During and after the migration nobody must delete, merge or rename products. There's always someone who decides, on that very day, to “just tidy up the categories a bit”. Every change can break the map: better a script that checks everything daily, because good intentions don't send alert emails.
4. After go-live
For the first two weeks you watch the numbers: errors in Search Console, response codes, cache. On a recent migration the home page went into a loop only for visitors without cookies, which is to say precisely for Googlebot. From the developer's browser everything was perfect, which is the most dangerous sentence in the trade. Always test as a “stranger” too: private window, terminal command, a colleague who has never seen the site.
The result we're after: zero 404s, no loss of rankings and a new catalogue that picks up where the old one left off. The postman doesn't even notice the move. It's the highest compliment he knows how to pay.