Shopify Redirects After a Migration: A Step-by-Step Guide

A migration moves your products to a new platform. Redirects move your visitors and your search traffic with them. Skip them and every old link, bookmark and search result lands on a 404.
When a store moves to Shopify, almost every URL changes. A product that lived at /product/blue-shirt/ now lives at /products/blue-shirt. A category becomes a collection. Blog posts get a new path. Search engines and other sites still point at the old addresses, and they will keep doing so for a long time.
A redirect answers an old address with "this page has moved here". Done well, a visitor never notices the migration. Done badly, the store launches with a wall of 404 errors and a drop in traffic.
This guide walks through a Shopify redirect plan in order: collect the old URLs, map them to new ones, build the file, check it, import it, and watch for what you missed. The facts about Shopify's rules come from its Help Center, and the links are at the end.
The plan in three stages
- 1. Collect and mapList every old URL, then match each to its closest new page
- 2. Check and importRemove loops and chains, then import the CSV under Content > Menus > URL redirects
- 3. Test and watchOpen the top pages on the live domain, then watch the 404 report
Each stage is a section below, in eight steps.
What a redirect does
A URL redirect is a rule: "when someone asks for this address, send them to that one". A permanent redirect (status code 301) tells browsers and search engines that the move is lasting and that the new address should replace the old one. Shopify's Help Center describes its URL redirects as 301 redirects and notes that they are cached by browsers and search engines, which matters when you test (see Step 7).
Shopify lets you manage redirects in the admin and import them in bulk from a CSV file. You do not need an app for a normal migration.
Step 1: Collect every old URL
You cannot redirect what you have not listed. Combine several sources, because none of them is complete on its own:
- The old site's sitemap, usually at
/sitemap.xml. This lists the pages the old platform wanted indexed. - A crawl of the old site with a crawler tool. This finds pages that the sitemap forgot.
- Google Search Console. The Performance report shows which URLs actually receive search traffic. Those are the ones you cannot afford to lose.
- Your analytics. Look at landing pages from the last 12 months, not only the last month.
- Pages that other sites link to. The Links report in Search Console shows the pages with the most external links.
Do this before the old site is switched off or its settings change. Once it is gone, the crawl is gone too.
Put everything into one spreadsheet. Add a column for traffic or links, so you know which URLs matter most when time runs short.
Step 2: Know where things live on Shopify
Shopify uses fixed path patterns. Knowing them tells you what "the new URL" will look like for each kind of page:
| Content | Shopify path |
|---|---|
| A product | /products/<handle> |
| A collection | /collections/<handle> |
| A page | /pages/<handle> |
| A blog article | /blogs/<blog-handle>/<article-handle> |
The handle is the last part of the address, and you can edit it. Decide your handles before you launch. When you change a URL on your store, Shopify lets you create a URL redirect from the old address (on pages it is a pre-selected option called "Create a URL redirect"); keep that option on.
Step 3: Map each old URL to a new one
For every row in your spreadsheet, decide where the visitor should go. The old platform's habits help you guess the pattern. These are typical defaults, so check your own site before relying on them:
| Old platform | Old address (typical) | Shopify address |
|---|---|---|
| WooCommerce | /product/blue-shirt/ |
/products/blue-shirt |
| WooCommerce | /product-category/shirts/ |
/collections/shirts |
| WordPress blog | /2024/05/how-to-wash/ |
/blogs/news/how-to-wash |
| Magento | /blue-shirt.html |
/products/blue-shirt |
Three rules keep the mapping honest:
- Redirect to the closest equivalent. An old product goes to the same product. An old category goes to the matching collection.
- If the page has no equivalent, send visitors to the nearest relevant parent, such as the collection the discontinued product belonged to.
- Do not send everything to the home page. A redirect that has nothing to do with the old page leaves visitors lost, and a search engine has no reason to treat the home page as a replacement for a specific product. If there is no real equivalent, a plain 404 is the more honest answer.
Some old URLs should not be redirected at all: duplicate pages, filter and sort variations, and pages that never carried value. Leave them out and let them return a 404.
For a store with hundreds of products, matching by hand is slow. The redirect CSV generator can propose a match for each old URL by comparing the words in the end of the paths, and shows a score for each. It only suggests; you decide which matches to accept.
Step 4: Build the CSV file
Shopify's import file is a plain CSV with two columns. The header row and the first rows look like this:
Redirect from,Redirect to
/product/blue-shirt/,/products/blue-shirt
/product-category/shirts/,/collections/shirts
/2024/05/how-to-wash/,/blogs/news/how-to-wash
The rules that matter:
- Use paths that start with a slash in "Redirect from", without the domain. The Shopify examples use paths such as
/example_product.php. - "Redirect to" can be a path on your store, or a full address on another domain. A single
/is the home page. - One redirect per row.
- Be careful with query strings. Shopify warns that URLs containing query strings "might not work as expected" as redirects. Map the clean URL where you can.
Shopify publishes a sample redirect CSV that you can download and fill in.
Step 5: Check the file before you import it
Most import problems come from a short list of mistakes. Check for each one before you upload.
| Problem | What happens | Fix |
|---|---|---|
| Redirect loop (A to B, B to A) | No page is ever reached | Break the loop so one address is the real target |
| Redirect chain (A to B, B to C) | Every visitor and crawler makes an extra request | Point A straight at C |
| Duplicate source (one old URL, two targets) | Shopify does not document how it handles this | Keep one target per old URL |
| Redirect to itself | Does nothing | Remove the row |
| Old URL still loads a page | Shopify only redirects from URLs that are broken, so the rule is ignored | Remove the row, or change the page that loads |
Shopify also lists addresses it cannot redirect from: those starting with /apps, /application, /cart, /carts, /orders, /services and /shop, the fixed paths /products, /collections and /collections/all, and a few reserved paths such as /a/, /community/ and /tools/. Rows like these will not work.
You can check all of this by hand, but a tool is faster and less error-prone. The redirect generator finds loops, chains, duplicates, self-redirects and the paths Shopify refuses, and it can flatten chains in one click. It runs in your browser, so the list is not uploaded anywhere.
Step 6: Import the redirects
- In the Shopify admin, go to Content > Menus > URL redirects.
- Click Import.
- Add your CSV file and click Upload file.
- Review the import that Shopify shows.
- Click Import redirects.
Shopify's Help Center gives a limit of 100,000 URL redirects per store, or 20,000,000 on Shopify Plus. It does not state a limit for a single file, so for a very large list, import in parts and read the review step each time.
Step 7: Test, on the live domain
A redirect list that has not been tested is a guess. Redirects only take effect when requests for the old domain reach Shopify, so run the real test after the domain points to the new store.
- Click through the top pages by traffic. Take your 50 most visited old URLs and open each one. Each should arrive at the right new page.
- Look at the status code. From a terminal:
curl -I https://example.com/product/blue-shirt/
A permanent redirect shows up as status 301, with the new address in the location header, for example:
HTTP/2 301
location: https://example.com/products/blue-shirt
- Try the variations. Shopify's documentation does not say how a trailing slash or letter case is treated, and it warns that URLs with query strings might not work as expected, so test the versions that real visitors and old links use. Add rows for the ones that fail.
- Use a private window. Shopify's Help Center says 301 redirects are cached by browsers and search engines, so after you change a rule the old result can keep appearing in a normal window.
Step 8: Watch for what you missed
Launch is not the end. Plan to check for the first few weeks:
- Google Search Console, Pages report. Look at the "Not found (404)" group. Any old URL that appears there with traffic is a missing redirect. Add it and import again.
- Resubmit your sitemap so Google finds the new URLs quickly.
- If the domain name also changed, use the Change of Address tool in Search Console for the domain move. It is a separate step from redirects.
- Keep the redirects. Do not delete them after a month. Old links and bookmarks keep arriving for years, and the cost of keeping a redirect is nothing.
Common mistakes
- Sending every old URL to the home page. Redirect each to its closest match.
- Building redirects after launch. The traffic drop has already begun by then.
- Forgetting blog posts and pages, because the product list was easier to build.
- Changing handles after launch and unticking the option that creates a URL redirect.
- Importing a file nobody checked for loops and chains.
- Never looking at the 404 report.
A short checklist
- Did I collect old URLs from a sitemap, a crawl, Search Console and analytics?
- Did I decide the new handles before building the file?
- Does each old URL point to its closest equivalent, not to the home page?
- Did I remove loops, chains, duplicates and addresses Shopify cannot redirect?
- Did I import the file and read Shopify's review step?
- Did I test the top 50 old URLs on the live domain?
- Is there a date in my calendar to check the 404 report?
Sources
- Shopify Help Center, Creating and managing URL redirects. It lists the CSV import steps, the addresses that cannot be redirected, the 301 caching note and the store limits.
- Shopify, sample URL redirect CSV file.
- Google Search Central, Redirects and Google Search.
- Google Search Console Help, Change of Address tool.