I recently migrated my entire store from an old Shopify website to a new one (also hosted on Shopify).
I’d like to set up 301 redirects so that each product page from the old site redirects to its corresponding product page on the new domain.
In Shopify, the best way to set up 301 redirects is by using URL redirects (also called “URL redirects” or “URL forwarding”), which are built into the platform.
And obviously, you’d need your old store alive for the redirects to work.
However, this would not really work, as redirects only apply to pages which can not be rendered in a normal way, so, basically, if you have a live
oldstore.com/products/t-shirt, yes you would be able to create a redirect from this URL to a new one, but it would not work, so you’d need to unpublish this product for the redirect to work.
Lots of manual work.
In my opinion this it not the best way though – you can rather move your domain(s) from the old store to the new one.
If you set it up it as a secondary domain which redirects to the primary one most of your redirects would happen automatically and you would only need to set up manual redirects for those products/collections/pages which have their handle changed.
May actually not need any of those at all.
Your old store would still be reachable via its myshopify.com address if you need it.
For your case, I’d actually recommend not setting up the redirects directly in Shopify. Instead, you can handle them at the DNS/proxy level, for example, using Cloudflare. Cloudflare allows you to create redirect rules that can forward requests from your old domain to your new domain. This can be especially convenient if most of your product handles stayed the same, since you can create patterns like:
Most likely, the free plan will be enough for your needs.
This approach has a few advantages:
You won’t clutter your Shopify admin with hundreds of redirects.
It keeps all redirects in one place, easy to manage and update.
It ensures all traffic to your old domain is correctly forwarded, even if someone tries to visit an outdated URL.
Regarding your other question:
Yes, you’ll need to keep the old domain active (and pointed to Cloudflare) for as long as you want the redirects to function. You don’t have to keep the old Shopify store active, though—you only need control of the DNS.
Make sure to set up 301 (permanent) redirects to preserve your SEO rankings.
Export your URL redirects
1.From your Shopify admin, go to Content > Menus.
2.Click URL redirects.
3.Click Export.
4.Choose which redirects you want to export.
5.Select which type of CSV file you want to export.
6.Click Export URL redirects.
Import your URL redirects
1.From your Shopify admin, go to Content > Menus.
2.Click URL redirects.
3.Click Import.
4.Click Add File and select a CSV file.
5.Click Upload file.
6.Review the import.
7.Click Import redirects.
8.Click Close.
If this helped, don’t forget to Like it and Mark it as a Solution!