All things Shopify and commerce
We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more
Hi everyone,
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.
For example:
oldstore.com/products/blue-t-shirt → newstore.com/products/blue-t-shirt
(though some handles have changed)
My questions are:
What is the best method to implement these redirects in Shopify?
Is there a way to bulk import a list of old URLs and their corresponding new URLs (CSV or app)?
Should I set up these redirects in the new store or the old one?
Is it necessary to keep the old store active for a period after the migration?
Thanks in advance for your help!
I'm trying to preserve my SEO rankings and avoid broken links in search results.
Hello @andy2021
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.
You can access this here:
Shopify Admin → Online Store → Navigation → View URL Redirects
You can add redirects one-by-one manually or use a CSV import for bulk redirects.
It's actually Content=> Menus=> URL redirects.
Obviously, this should be setup in the old store.
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.
https://help.shopify.com/en/manual/online-store/menus-and-links/url-redirect
https://help.shopify.com/en/manual/domains/domain-type/change-primary-domain
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:
oldstore.com/products/* → newstore.com/products/$1
If some handles have changed, you can also upload a list of specific redirects as rules or use Cloudflare Workers for more advanced logic.
You can read more about how to set this up here: https://developers.cloudflare.com/pages/configuration/redirects/
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.
Hope this helps!
Edit multiple URL redirects at the same time
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!