E-commerce 8 min read

301 Redirects: How to Migrate Without Losing SEO

A 301 redirect is a permanent instruction that sends a browser — and a search engine — from an old URL to a new one. That is the whole mechanism. It matters far more than it sounds, because 301 redirects are the only lever you control that decides whether a migration keeps the rankings you already earned or quietly resets them to zero.

Every replatforming project changes URLs. Platforms disagree about how product, collection and blog URLs should be structured, and none of them will adopt your old scheme to be polite. So the day you launch, every address Google has indexed for years either points somewhere sensible or points at a 404.

The redirect map is the deliverable that decides which. Here is how to build one, how to implement it, and the mistakes that do the most damage.

What a 301 redirect actually does

When a browser requests an old URL, the server answers with HTTP status 301 and a Location header naming the new address. The browser follows it. Crawlers do the same, and they treat the 301 as a signal that the move is permanent: the new URL should replace the old one in the index, and the ranking signals the old URL accumulated — links, authority, history — should transfer with it.

Google’s own guidance is that 30x redirects don’t lose PageRank. That is the part people get wrong in both directions: some assume redirects are lossy and avoid them, others assume redirects are magic and skip the mapping work. Neither is right. A correct 301 to a genuinely equivalent page carries its weight. A 301 to a page that isn’t equivalent gets treated as a soft 404, and everything the old URL earned is gone.

If you want the short version, we keep a glossary entry for the 301 redirect alongside the rest of the platform terminology.

301 vs 302, and why the difference matters

A 302 says “temporary — keep the old URL indexed.” A 301 says “permanent — replace it.” For a migration you always want 301. Using 302s for a permanent move tells search engines to hold onto URLs that no longer exist, which is the slowest possible way to consolidate your rankings onto the new site. It’s a one-character difference in a config file and one of the most common causes of a migration that “should have worked.”

Why migrations lose traffic: the platforms disagree about URLs

The reason a redirect map is unavoidable is structural. Each platform has its own opinions about URL shape, and most of them are enforced rather than configurable. Shopify, for example, reserves /products/, /collections/, /pages/ and /blogs/ as fixed prefixes — you can change the handle, not the prefix.

Content type Typical old URL Shopify URL
Product (WooCommerce) /product/item-name/ /products/item-name
Category (WooCommerce) /product-category/name/ /collections/name
Product (Magento) /item-name.html /products/item-name
Product (Wix) /product-page/item-name /products/item-name
Blog post /blog/post-title/ /blogs/news/post-title

Every row in that table is a URL that breaks on launch day unless something maps it. Multiply by a catalogue of a few thousand SKUs plus years of blog posts, and you have the actual scope of the job. This is also why the “signs it’s time” conversation and the redirect conversation are the same conversation — see our guide on when replatforming is worth it for the decision that precedes this work, and the replatforming definition for the terminology.

How to build a 301 redirect map

A redirect map is a two-column spreadsheet: old URL, new URL. Getting it right is a five-step process, and the order matters.

1. Export every URL that currently exists

Not every URL you think exists — every URL that does. Pull from four sources and deduplicate: your XML sitemap, Search Console’s page report, analytics landing-page data for the last 12 months, and a full crawl of the live site. The sitemap alone will miss orphaned pages that still hold links; the crawl alone will miss URLs that are indexed but no longer linked internally.

2. Rank by what actually earns

Not every URL deserves the same care. Sort the export by clicks, impressions and referring domains, and treat the top of that list as the pages you map by hand and verify individually. The long tail can be handled with pattern rules. Spending equal attention on a product that has never received a visit and on your best-linked category page is how migrations run out of time before the important rows are done.

3. Map one-to-one, to the closest true equivalent

Each old URL should point to the single page that best replaces it. A discontinued product maps to its replacement product, or failing that to its parent collection — not to the homepage. If nothing equivalent exists and nothing links to the old page, letting it 410 is a legitimate answer. The one thing to avoid is a redirect that promises the user something the destination doesn’t deliver.

Four possible 301 redirect destinations for the same discontinued product URL: a replacement product and a parent collection both keep the ranking signal, while redirecting to the homepage is treated as a soft 404 and leaving a 404 discards the signal entirely.
The same source URL, four destinations. Only the two that genuinely replace the original keep what it earned.

4. Implement before launch, not after

On Shopify, redirects live in the admin under URL Redirects, and they accept a bulk CSV import — which is exactly why the map should be a spreadsheet from the start. On a server-level move you’re writing rules in the host config. Either way the redirects must be live the moment DNS points at the new store, because the crawl that discovers your migration will happen within hours, not weeks.

5. Verify with a crawl, then keep watching

After launch, crawl the full list of old URLs and check the response chain. What you want to see on every row is a single 301 landing on a 200 — one hop, no detours. Then watch Search Console’s coverage report for a few weeks: a rise in “not found” errors is the early warning that a batch of URLs never made it into the map.

Five redirect mistakes that cost the most traffic

  • Redirecting everything to the homepage. The single most damaging shortcut. Google treats a mass redirect to an irrelevant destination as a soft 404, so the old URL’s signals are discarded rather than transferred — you get the traffic loss of a 404 with none of the diagnostic clarity.
  • Redirect chains. Old URL → interim URL → final URL. Chains work for users but add latency and dilute the signal, and if you’ve migrated twice the chain is often four or five hops long. Flatten every chain so each old URL points directly at its final destination.
  • Mapping only products. Blog posts, category pages, filtered views, paginated series, PDFs and old landing pages all hold links. Catalogue URLs are the obvious half of the job; they are rarely the half that holds the backlinks.
  • Using 302 for a permanent move. Covered above, and still common — usually because a default was left untouched.
  • Removing redirects too early. Google’s site-move documentation recommends keeping redirects in place for at least a year. Old links, bookmarks and email campaigns keep firing long after the migration feels finished.
Comparison of a three-hop redirect chain, where an old product URL passes through an interim URL before reaching its destination, against a flattened single-hop redirect that points the old URL directly at the final page.
Chains resolve for users but add latency and break the moment one link is removed. Flatten every chain to a single hop.

How 301 redirects work on Shopify specifically

Shopify handles this in the admin rather than in a config file. You create redirects one at a time or import them in bulk as a CSV with Redirect from and Redirect to columns — the format that makes a spreadsheet-based redirect map drop straight in.

Two constraints are worth knowing before you plan. First, you can’t create a redirect from a URL that Shopify is actively serving; the source has to be a path the store doesn’t already resolve. Second, the reserved prefixes are not negotiable, so any migration onto Shopify will change the shape of every product and collection URL. Plan the map around that rather than fighting it.

If you’re mapping a specific platform, the mechanics differ enough to be worth reading separately: Wix to Shopify, WooCommerce to Shopify and Magento to Shopify each have their own URL quirks. Our free Shopify migration checklist covers the redirect step alongside the rest of the launch sequence.

Frequently asked questions

Do 301 redirects pass SEO value?

Yes, when the destination is a genuine equivalent of the source. Google has stated that 30x redirects don’t lose PageRank. The failure mode isn’t the redirect type — it’s redirecting to a page that doesn’t match the intent of the original, which gets handled as a soft 404 instead.

How long should I keep 301 redirects in place?

At least a year, per Google’s site-move guidance, and there’s rarely a good reason to remove them after that. A redirect rule costs nothing to keep; a broken inbound link from a three-year-old article costs a visit every time someone clicks it.

How long before Google processes the redirects?

It depends on how often your URLs are crawled, which is why high-value pages get recrawled first and the long tail can take considerably longer. Submitting the new sitemap and keeping the old URLs reachable through the redirect speeds up discovery — but the recrawl is Google’s schedule, not yours.

Can I redirect an old URL to a different domain?

Yes — cross-domain 301s work the same way and are standard for a rebrand or a domain consolidation. The requirement is the same: one hop, to an equivalent page, kept in place long enough for the index to catch up.

The version worth doing

Most migrations that “lost their SEO” didn’t lose it to the new platform. They lost it to a redirect map that was built in the last week of the project, covered only the product catalogue, and was never verified after launch.

The work is unglamorous and entirely mechanical: export everything, prioritise by what earns, map one-to-one, implement before DNS changes, then crawl the old list and prove every row resolves in a single hop. Do that and a migration is a change of address. Skip it and it’s a relaunch from zero.

If you’re weighing a move and want a read on what your current URLs are actually worth before anything changes, our free Shopify audit is a reasonable place to start.

Share X in wa
Mohamed ElQadi
Mohamed ElQadi Tech Lead @ Qode Bites

I help business owners untangle the mess between their website and their revenue — performance, conversion, and the unglamorous fixes that move numbers. Egypt + US.

Follow QodeBites on LinkedIn →
• FREE PLAYBOOK

The E-Commerce
Growth Playbook

17 moves that turn a store into a revenue machine — the exact levers our team pulls for the brands we build and grow.

  • Convert more of the traffic you already pay for
  • Speed wins that lift revenue on every visit
  • Retention flows that make the second sale cheaper
  • Ad math so you scale in profit, not blind

Get the free PDF

Enter your details and we’ll send it straight to your screen.

No spam — the guide now, and the occasional useful email. Unsubscribe anytime.

More Insights

Discover more articles, expert perspectives, and practical insights on software development, product design, emerging technologies, and digital innovation.

Ready to light it up?

Start a Project

Your Trusted Growth Partner
For Startups And Enterprises

From first concept to final deployment, Qode Bites delivers everything needed to take your idea live — with seamless setup, performance-ready infrastructure, and expert support every step of the way. Book a free 30-minute strategy call.

What We'll Cover

  • Current store performance
  • UX and conversion bottlenecks
  • Growth opportunities
  • Recommended action plan
Book a Strategy Call

June

FriSatSunMonTueWedThu

Sat, June 2