Shopify uses fixed URL patterns, so almost every WooCommerce URL changes when you move. A 301 redirect sends visitors and search engines from each old address to the new one. Here is how the patterns map, which cases need care, and how to load the whole map into Shopify in one import.
01
Why every URL changes
WooCommerce lets you choose permalink bases (Settings → Permalinks). Shopify does not: products always live under /products/, collections under /collections/, pages under /pages/ and blog articles under /blogs/<blog-name>/. So /product/linen-apron/ becomes /products/linen-apron even when the slug stays the same.
Without redirects, those old URLs return a 404 page: links from other sites, bookmarks, old emails and search results all land on an error.
02
The URL patterns, type by type
| Type | WooCommerce (default) | Shopify |
|---|---|---|
| Product | /product/linen-apron/ | /products/linen-apron |
| Category | /product-category/kitchen/ | /collections/kitchen |
| Sub-category | /product-category/kitchen/aprons/ | /collections/aprons |
| Product tag | /product-tag/gift-idea/ | /collections/all/gift-idea |
| Shop page | /shop/ | /collections/all |
| Page | /about-us/ | /pages/about-us |
| Blog post | /2024/03/how-to-wash-linen/ or /blog/how-to-wash-linen/ | /blogs/news/how-to-wash-linen |
| Blog category | /category/recipes/ | /blogs/news/tagged/recipes |
| My account | /my-account/ | /account |
/collections/all/<tag> is Shopify's built-in tag filter on the all-products collection. If a tag deserves its own landing page, create a collection for it and redirect there instead. news is the blog every Shopify store starts with; use your blog's handle if you created another one.
If you changed the permalink bases in WooCommerce (for example /shop/ or /item/ instead of /product/), the left column changes but the right one does not.
03
What the map looks like
Shopify imports redirects from a CSV file with two columns, Redirect from and Redirect to. One line per old URL:
redirects-shopify.csv
8 ROWS · 301
| Line | Redirect from | Redirect to |
|---|---|---|
| 2 | /product/linen-apron-natural | /products/linen-apron-natural |
| 3 | /product/caf%C3%A9-mug-12oz | /products/cafe-mug-12oz |
| 4 | /product-category/kitchen/aprons | /collections/aprons |
| 5 | /product-tag/gift-idea | /collections/all/gift-idea |
| 6 | /shop | /collections/all |
| 7 | /about-us | /pages/about-us |
| 8 | /2024/03/how-to-wash-linen | /blogs/news/how-to-wash-linen |
| 9 | /my-account | /account |
04
Accents, long slugs and duplicates
- Accents and non-Latin characters. WordPress keeps them in slugs and browsers request them percent-encoded (
/product/caf%C3%A9-mug/). Keep the old path exactly as it was requested inRedirect from, and use the handle Shopify actually created (oftencafe-mug) inRedirect to. - Slugs longer than 255 characters. Shopify handles are limited to 255 characters. Long slugs are cut, so check the real handle after import.
- Two products, one handle. When two items end up with the same handle, Shopify adds
-1,-2to the next ones. Nested categories are a common cause:/men/shirts/and/women/shirts/both wantshirts. Your map must point to the handle each item actually received. - The same old URL twice.
/product/mug,/product/mug/and/product/mug?ref=emailare one URL for the redirect. Keep one line, without the trailing slash or query string. - Paths that should not be redirected.
/cartexists on both platforms. Media files, feeds andwp-adminpaths do not need a line.
05
Build the map from your URL list
- Collect every old URL: the XML sitemaps from your SEO plugin (
/sitemap_index.xmlwith Yoast or Rank Math,/wp-sitemap.xmlotherwise), plus Search Console's indexed pages and top linked pages. - Add the type of each URL when posts and pages share the same
/%postname%/permalink, because the path alone cannot tell them apart. - Generate the target for each line with the patterns above.
- After the Shopify import, replace each target handle with the one Shopify actually created, then remove duplicates.
- Check that no target is itself redirected: one hop, A to C, not A to B to C.
Redirect from,Redirect to
/product/linen-apron-natural,/products/linen-apron-natural
/product-category/kitchen/aprons,/collections/aprons
/about-us,/pages/about-us06
Import the CSV in Shopify
- In the Shopify admin, open the URL redirects screen (Online Store → Navigation → URL redirects, or Content → Menus → URL redirects in newer admins).
- Choose Import, upload the CSV and review the preview Shopify shows.
- Leave "Override existing redirects" unchecked on the first import.
- When the import finishes, compare the number of redirects Shopify reports with the number of lines in your file.
You can import before the switch-over and test on the preview store's address. After the domain points to Shopify, test again on the real domain:
tail -n +2 redirects-shopify.csv | cut -d, -f1 | while read -r path; do
curl -s -o /dev/null -w "%{http_code} $path -> %{redirect_url}\n" "https://yourstore.com$path"
doneEvery line should print 301 followed by the right Shopify address. For the steps around it, see the migration checklist.