Redirection Plugin CSV Generator
Convert a Shopify redirects export, .htaccess rules or a plain URL list into a CSV the Redirection plugin imports.
Your details
Rewrites /products/, /collections/, /pages/ and /blogs/ targets to WooCommerce's default URLs, and adds pattern rules for every old Shopify URL.
- Read as
- Shopify redirects export
- Redirects
- 5
- Pattern rules
- 6
- Regex rows
- 6
Redirection import file
source,target,regex,code
/products/linen-shirt-old,/product/linen-shirt/,0,301
/collections/summer-2025,/product-category/summer/,0,301
/pages/shipping-info,/shipping/,0,301
/blogs/news/launch-week,/spring-launch/,0,301
/products/gift-card-legacy,/product/gift-card/,0,301
^/collections/[^/]+/products/([^/?]+)/?$,/product/$1/,1,301
^/products/([^/?]+)/?$,/product/$1/,1,301
^/collections/all/?$,/shop/,1,301
^/collections/([^/?]+)/?$,/product-category/$1/,1,301
^/pages/([^/?]+)/?$,/$1/,1,301
^/blogs/[^/]+/([^/?]+)/?$,/$1/,1,301The 6 pattern rules at the end catch every other old Shopify URL. They assume your WooCommerce product and category slugs match your Shopify handles, and WooCommerce's default /product/ and /product-category/ bases. Keep them last so exact rules win.
Import at Tools → Redirection → Import/Export: choose the file, pick a group, then preview before importing. The header row is skipped automatically.
The Redirection CSV format
regex is 0 for an exact URL or 1 for a regular expression. code is the HTTP status, such as 301.Redirection skips a header row that starts with source,target, so the file includes one for readability. Regex sources are matched against the path, starting with /, and $1 in the target copies the first captured group.
| You paste | The tool reads |
|---|---|
Shopify export (Redirect from,Redirect to) | Each row as an exact redirect |
.htaccess (Redirect, RedirectMatch, RewriteRule) | Status codes, query conditions and regex, turning simple patterns back into exact URLs |
| Rank Math's Apache or Nginx export | The same RewriteRule and rewrite lines |
| Any CSV with old/new, from/to or source/target columns | Those two columns, plus code and regex columns if present |
Moving from Shopify to WooCommerce
Turn on Convert Shopify URLs to WooCommerce and the tool rewrites Shopify-style targets and adds pattern rules for every other old URL, using WooCommerce's default bases:
| Shopify URL | WooCommerce URL |
|---|---|
/products/linen-shirt | /product/linen-shirt/ |
/collections/summer | /product-category/summer/ |
/collections/all | /shop/ |
/pages/shipping | /shipping/ |
/blogs/news/spring-launch | /spring-launch/ |
This assumes your WooCommerce slugs match your Shopify handles. If you changed your permalink bases under Settings → Permalinks, edit the targets to match.
Importing the file
- 01
Download the CSV
Use the Download button above the file.
- 02
Open the importer
In WordPress go to Tools → Redirection → Import/Export and choose the file.
- 03
Preview, then import
Pick a group and how to treat duplicates, preview, then import. Test a few old URLs afterwards.
Questions people ask
What columns does the Redirection plugin CSV need?
Source URL and target URL, optionally followed by regex (0 or 1) and the HTTP code. This tool writes all four.
Can I import my Shopify redirects into WooCommerce?
Yes. Export them from Shopify under Content → Menus → URL redirects → Export, paste the file here, and turn on the Shopify conversion.
Does Redirection import .htaccess directly?
It can import .htaccess files, but only redirects that map directly to its own format. Converting here lets you preview and fix everything first.
Why was a row dropped?
Rows that point to themselves, duplicates of an earlier source, and rewrites without a redirect flag are skipped. The notes list each case.
Related tools
Last reviewed 30 September 2026.
Sources: Redirection: Import and export · Redirection: Regular expressions · Redirection source: CSV parser (header handling, columns) · Shopify Help Center: URL redirects · Rank Math source: redirection export (Apache and Nginx)
