Dealing with 301 Redirects when migrating to Shopify
If you have an existing website and are moving or have already moved to the Shopify platform then an important aspect you need to cover is link redirection.
For example, if your ecommerce website was hosted on Magento then you will need to be 301 redirecting. This is true for almost any ecommerce provider.
Why do I need to 301 redirect?
A 301 redirect tells your websites server to send any traffic received to a specific URL and send it to another URL permanently.
You should have encountered a 404 page in your time browsing the web. Its when you click on a URL hoping to see something but the content is gone and instead you get an error page. There are a number of reasons why this happens but unfortunately it is something over looked by many.
If you move your website from it’s existing host (e.g Magento, WooCommerce, PrestaShop etc) to Shopify, you will need to make sure you setup 301 redirects. It will save your SEO from getting a large hit in traffic.
Can you give me an example?
To explain this we will use Magento to Shopify as an example. The URL structure in Magento is different to Shopify out of the box. This means products, categories and pages are use a URL structure differently to the way Shopify does.
Collections is a brilliant example. Shopify uses Collections where as Magento uses categories.
Now lets look at the url:
A URL for a category in magento will look like this: http://domain.com/catalog/category/view/id/2
If URL rewrites exist then these can be beautified to something like http://domain.com/accessories.html
With Shopify, for any collection (what Magento calls a category), the URL is always routed through /collections. So it would look like this:
Its a similar story for products as well as CMS pages. Pages for example all route through /pages.
So what do I need to do?
All you need to do with these links is make sure they redirect. If you have a website with 100 products in 10 categories on Magento, you will likely have at least 110 redirects to make. It’s usually more due to the way magento URL structures work.
Under Shopify, you can add redirects easily. Just navigate to Online Store > Navigation. At the top of the page you will see a button that says URL redirect.
Once clicked, you will see a list of URL redirects your store has. Its likely this will be empty if you have recently moved to Shopify. To add a URL redirect, click the Add URL redirect button.
Taking our previous example, lets setup a redirect for our accessories category as if we had migrated from Magento. First we would have already setup the collection in shopify called “Accessories”. This would have automatically generated the new Shopify URL so we would just need to add a redirect from the old URL:
Now that we have the redirect added, any traffic going to the old domain “www.domain.com/accessories.html” will be redirected to “www.domain.com/collections/accessories”. This important because previously, it would have thrown a 404 to the user which is never good.
Ok… How can I bulk add redirects in Shopify?
If you have a small site that you have moved then you shouldn’t have many redirects to add so you can easily add them manually in Shopify using the above steps.
If you have moved a large website then chances are you have 100’s, 1000’s or possibly more redirects you will need to add.
Fortunately there is a free App for Shopify that will let you upload a CSV with your redirects you wish to setup. The App is called Easy Redirects – Bulk 301 Redirects. The app allows you to upload a CSV containing 2 columns, 1 with the old URL and 1 with your new Shopify URL.
Now, the App is great but it’s not magic. You need to put the data into the CSV correctly meaning the Old URL in the first column will relate to the right URL in the second column.
If you have 1000’s of redirects you need to go through them its going to take some time manually. You can use some Excel magic if you are competent for example VLOOKUP to match old to the new based on a key strings.