Shopify 301 redirects send visitors and Google from an old URL to its new address, and on a migration you load hundreds of them at once from a CSV with two columns: Redirect from and Redirect to. The file takes minutes to import. The map behind it is where the work is. This guide gives you the five steps we use to build that map, the limits Shopify enforces, the checks to run after go-live and a free CSV template in Shopify’s import format.
We are noprob agency. In the Shopify Launch Sprint the 1:1 redirect map is tested automatically before and after go-live, so this is a process we run, not a theory. Our migration SEO checklist says what to check across a whole move; this article is the process for producing the one document that checklist depends on. For the full path of a migration, read the Shopify migration guide.
What does a Shopify 301 redirect do, and what does the CSV look like?
A 301 is a permanent redirect: it tells browsers and search engines that a page has moved for good and where it lives now. Google’s guide on site moves with URL changes recommends permanent server-side redirects and asks you to decide a destination for every old URL. Shopify’s own help page mentions 301s when it warns that browsers and search engines cache them, which matters when you test.
The Shopify import file is a CSV with two headers, Redirect from and Redirect to, and one redirect per row. Shopify’s sample file, linked from its URL redirects help page, has exactly those two headers and one example row that sends /example_product.php to /products/example-product. The examples on the page use paths that start with a slash, and the help page says to use a relative URL for your primary domain and a full URL only for external destinations.
The template has 14 example rows with typical WooCommerce, Magento and PrestaShop patterns: products, categories, pages, a blog post, a brand and a parameter URL. Replace the examples with your rows and keep the two headers untouched. Everything else you need to track lives in a separate working sheet, and you export only two columns from it:
- Old URL and new URL: the two columns that become the import file.
- Page type: product, category, page, post, brand, other.
- Source: where you found the URL (sitemap, Search Console, crawl, backlinks, archive).
- Traffic or links: why the row matters, so you know where to look twice.
- Decision: keep, merge or retire.
- Checked: the date and who checked it.
How do you build the redirect map in five steps?
You build the map in five steps: collect every old URL, match each one to a new URL, decide the cases with no equivalent, import the file, and test after go-live. The order matters because each step feeds the next, and the first one decides how complete the result can be.
Step 1: Collect every old URL, not only the ones in the sitemap
The sitemap shows what the old store wanted Google to see; Google remembers more. So you combine sources, remove duplicates and keep the source in a column.
- All the old sitemaps: products, categories, pages and posts.
- Search Console: the performance export for every URL that still gets impressions or clicks, and the Pages report for what Google has indexed.
- A crawl of the old site, which also shows internal links and the redirects that already exist.
- A backlinks export: the pages other sites link to are the ones you cannot afford to lose.
- Archived copies of the old site, for URLs that disappeared before the migration but still collect links.
- The landing pages in your analytics over the past year.
My rule: collect while the old store is still online. When the domain stays the same, once the new store is live there is nothing left to crawl.
Step 2: Match each old URL to a new one, by page type
Match by page type, because every type has its own rule: products to products, categories to collections, pages to pages and posts to blog articles. Do the patterns in a spreadsheet and the exceptions by hand. These are the patterns we meet most often, always to be checked against your own settings, because every platform lets you change them:
- WooCommerce. /product/blue-cotton-shirt goes to /products/blue-cotton-shirt and /product-category/shirts to /collections/shirts. Those two bases, product and product-category, are the defaults in WooCommerce’s source code, but a store can change them. Posts live at the root of the domain (or under a date) and go to /blogs/news/. More in WooCommerce to Shopify.
- Magento. /blue-cotton-shirt.html goes to /products/blue-cotton-shirt, and so does the same product with a category path such as /men/shirts/blue-cotton-shirt.html. Categories like /men/shirts.html go to a collection. The suffix is configurable, and system paths like /catalog/product/view/id/34 get a row only if Search Console shows impressions. More in Magento to Shopify.
- PrestaShop. The default product route is {category:/}{id}-{rewrite}.html, so /shirts/7-blue-cotton-shirt.html goes to /products/blue-cotton-shirt; categories (/12-shirts) go to collections, CMS pages (/content/4-delivery) to /pages/, brands (/brand/3-acme) to a vendor collection. The routes are in PrestaShop’s Dispatcher.php. The ID in the address is a reliable key for the join. More in PrestaShop to Shopify.
Keep the slug identical wherever you can: then the match is mechanical. When the slug changes (renamed products, translated handles), join on product ID or SKU from the two catalog exports instead of guessing from the name. Several old URLs can share one target: variants and category-path versions of the same product all land on one /products/ page.
Point every row at the final URL. If /a already redirected to /b on the old platform, /a goes straight to the new /b. Google asks for no chains, and where they cannot be avoided, no more than three hops and always fewer than five. On a new store you can aim for one.
Step 3: Decide the cases with no equivalent
When an old page has no twin on the new store, send it to the closest page that serves the same visitor, and if no such page exists, let it return 404. Google warns that sending many old URLs to one irrelevant destination, such as the home page, can confuse users and may be treated as a soft 404. These are the calls I recommend:
- Discontinued product: the collection it lived in, or a replacement only if it solves the same need.
- Two categories merged: the surviving collection.
- Tag, filter, pagination, author and attachment pages: the nearest collection if they have links or traffic, otherwise no row.
- Old campaign pages: the page that carries the offer today, or no row.
- Pages you retire on purpose: no row. A 404 is an honest answer, and writing "retire" in the Decision column keeps it a decision instead of an omission.
Step 4: Import the file in Shopify
In Shopify you import redirects under Content > Menus > View URL Redirects: click Import, add the CSV file, upload it, review the import and click Import redirects. Do it before the domain moves: Shopify’s guide for migrating from WooCommerce recommends setting redirects up before you transfer the domain. Shopify allows up to 100,000 redirects, or 20,000,000 on Plus.
Before you click, run these four checks on the file:
- No collisions. No Redirect from path loads a live page on the new store, because Shopify ignores it.
- Every row is complete. Both values are present, the source starts with a slash and has no domain, and no source appears twice.
- No reserved paths. No source falls in the list in the next section.
- Every target is real. Each Redirect to is a page that answers 200 today, not another redirect and not a typo.
For large or repeated loads there is also the Admin GraphQL API: the UrlRedirectImport object reports how many rows were created, updated and failed, which gives you a count to compare with your file. After the import, export the redirects as a CSV from the same screen: that file is your record of what went live.
Step 5: Check after go-live
After go-live you test every old URL, not a sample, and then watch Search Console for what the map missed. Google’s guide suggests the URL Inspection tool for single URLs and scripts or command-line tools for large sets. Four checks:
- Run the whole list. Every old URL in the map should answer with one 301 and then 200 on the new page. Write the rows that fail back into the sheet. Test the version with and without the trailing slash too: WooCommerce addresses end with one.
- Open the top pages by hand. The URLs with the most traffic and backlinks, in a private window, so a cached redirect does not fool you.
- Watch Search Console. Submit the new sitemap and follow the Pages report: new "not found" URLs with impressions are rows you missed.
- Come back. Feed the new 404s into the map after two weeks and again at 90 days, and keep the redirects: Google says generally at least a year.
What can’t Shopify redirect?
Shopify redirects only from URLs that return a 404, and a handful of paths and patterns are off limits, so decide those rows before launch. All of these come from Shopify’s URL redirects help page:
- A live page wins. The page says you can redirect only from broken URLs. If the old path now loads a valid page, the redirect does nothing: that is the collision check in step 4.
- Fixed paths: /products, /collections and /collections/all cannot be redirected.
- Reserved prefixes: URLs beginning with /apps, /application, /cart, /carts, /orders, /services and /shop. This hits WooCommerce hard: its cart and its shop page sit on those paths. The page words /shop differently in two places, so test your row. If it does not take, treat it as a case with no equivalent: point your menus and the links you control to /collections/all.
- Collection tag filters: URLs like /collections/name/tag cannot be redirected, even if no product has the tag.
- .html addresses: a .html URL cannot be redirected to the same address without .html. It does not stop /blue-cotton-shirt.html going to /products/blue-cotton-shirt.
- Query strings: Shopify says they might not work as expected. Treat parameter URLs such as /index.php?controller=category&id_category=12 as at risk: our template has one so you can test how your store behaves, and if it fails you drop that row.
- Language and market subfolders: the page says redirects apply to all of them and, in the limitations, says they do not. Test one redirect in each subfolder before you trust it.
- Cache: browsers and search engines cache 301s, so a wrong redirect does not vanish when you delete it. Test before the domain moves.
How does an AI agent speed up the redirect map, and why does it need a separate review?
An AI agent speeds up the matching in step 2, the slow middle of the map, but it should propose rows and never approve them: a script and a separate review decide what is imported. At noprob agency we work every day with agents built on Claude Code (development with AI agents is one of the superpowers of our Custom AI System), and this is the split I recommend for redirect maps.
- Rules first, no AI. A script handles the clean patterns by slug. It covers most of the file and it is deterministic.
- The agent takes what is left. For each remaining URL it receives the old page (title, H1, breadcrumb) and a closed list of valid new URLs from the catalog export. It must pick from that list, give a one-line reason or answer "no equivalent". A closed list is what stops it from inventing addresses.
- Scripts check the output. Every target exists and answers 200, no chains, no duplicate sources, no reserved paths.
- A separate reviewer. A second pass, in a fresh context, sees only the old page and the proposed target, with written criteria: same intent, same product and not just a similar one, a collection and never the home page. It does not see the first agent’s reasoning. Rows it flags go to a person.
- A person signs. Every URL with traffic or backlinks gets human eyes, plus a random slice of the rest.
Why separate? Whoever wrote a row tends to repeat its own logic when it reads the row again, and that holds for a model as for a person. Independence is what finds errors. The same method, applied to the whole migration, is in Migrating to Shopify with AI agents. If you want to build agents like these for your own team, that is the work of the AI Accelerator.
What did this look like on a real migration?
On Nazzi, a WooCommerce store, we checked 215 archived URLs against the new store after go-live and delivered the CSV of 301 redirects, ready to import in Shopify (case study). The lesson is the one in step 5: the map is not finished when the file is imported. Testing the old addresses one by one is a separate job from building the map, and it is what turns a list of redirects into a result you can trust.
Frequently asked questions
What does a 301 redirect do on Shopify?
A 301 redirect is a permanent redirect: it sends visitors and search engines from an old URL to a new one and says the move is for good. Google recommends permanent server-side redirects when URLs change, with one destination for each old URL. In Shopify you create them under Content > Menus > View URL Redirects.
How do I import 301 redirects into Shopify with a CSV?
Prepare a CSV with the headers Redirect from and Redirect to and one redirect per row. Then open View URL Redirects, click Import, add the file, upload it, review the import and click Import redirects. Our free template is already in this format.
Why are my Shopify redirects not working?
The most common cause is that the old URL still loads a valid page: Shopify only redirects from broken URLs. Other causes are a reserved path such as /cart or /shop, a fixed path such as /collections, a query string in the source URL, or a browser that cached an earlier 301. Test in a private window and check the row for these cases.
Can Shopify redirect /collections, /products or /shop?
No. Shopify’s help page says you cannot redirect the fixed paths /products, /collections and /collections/all, nor URLs that begin with prefixes such as /apps, /cart, /orders, /services and /shop. A WooCommerce shop page at /shop is the usual case: decide how to handle it before launch.
How long should I keep 301 redirects?
Google’s guide says to keep them for as long as possible, generally at least one year. From a visitor’s point of view you can keep them indefinitely, so my advice is never to delete a redirect that still receives clicks.
Can an AI agent build the redirect map?
It can propose most of the rows, especially the ambiguous ones, but it should not approve them. Rules and scripts handle the clean patterns, the agent suggests targets from a closed list of real URLs, and a separate review plus a human sample decide what is imported.
The Shopify Launch Sprint moves your store to Shopify in 14 days with our Custom AI System: a fixed calendar, a public price and 4 written guarantees.

Antonio Manitta
Founder & eCommerce Manager at NoProb Agency
For over 7 years I have helped fashion, supplements, and DTC brands scale their eCommerce. I work in long-term partnership with three brands at a time, building stable systems that compound.
About NoProb →
















