·

·

Shopify SEO: 301 redirects when rebranding or changing domain

I spend a fair bit of time searching through forums and community threads when it comes to some of Shopify’s trickier e-commerce SEO limitations.

There’s one question that had me banging my head against the desk and unable to find a clear answer though. Even asking on Shopify’s live chat didn’t help to clarify.

When going through a rebrand and/or changing the primary domain of your Shopify store, what happens with 301 redirects?

URL Redirects

If you’ve set up a redirect within Shopify, you’ll know that you’re only able to use a relative URL for where you’re redirecting from, which is the path or everything that comes after the domain.

For example you have to use, /collections/shoes instead of https://mydomain.com/collections/shoes.

An absolute URL for comparison is the full URL, including protocol (https), subdomain (e.g. www), domain (mydomain.com ), and path (/collections/shoes).

It’s a fairly quick and easy process to change the primary domain of your store (more on that below), and you’d assume that once this has changed over, from mydomain.com to newdomain.com, these relative URL redirects would then be associated with the new domain.

As an example, if you already had /collections/shoes redirecting to /collections/trainers:

The full or absolute URL redirect would be https://mydomain.com/collections/shoes redirecting to https://mydomain.com/collections/trainers.

And with a domain migration, you’d assume this could change to:

https://newdomain.com/collections/shoes redirecting to https://newdomain.com/collections/trainers.

This isn’t what we’re trying to achieve from an SEO migration perspective.

What we really need to focus on is making sure that https://mydomain.com/collections/trainers (the old domain) 301 redirects to the same page on the new domain, https://newdomain.com/collections/trainers.

This is the most critical part of any website or domain migration in order to retain the organic keywords and traffic that could have been built up over a number of years, which can be achieved with like-for-like 301 redirects and identical pages.

Again, because of the use of relative URLs in Shopify, you’d also assume that you can’t set up redirects from your old domain after changing over because it will no longer match your primary domain.

I’m yet to find a specific mention or article about how this is handled by Shopify. I could really only find answers about how to set up redirects or redirect your entire domain to a different domain, despite a lot of searching.

The alternative options are more time consuming and complicated too, such as setting up redirects from your old domain in an .htaccess file on an Apache server.

The good news

I found this out whilst helping a freelance e-commerce client through a rebrand and domain change. They had very little organic traffic and it was low season (always advised), so I was in a position that I could make the switch with less risk and easily change it back if needed.

Shopify does in fact automatically set up like-for-like 301 redirects from your old domain’s pages to the same page on your new domain.

This means if you are changing your brand name and/or domain, without making any changes to the website’s structure, pages etc, you can literally press a couple of buttons with no concerns.

Who knew, something that Shopify has nailed when it comes to SEO!

Additional Points

I assume this only works if you keep your old domain within Shopify, and because it’s best practice to keep redirects in place for at least 12 months after a migration (ideally longer), I’d avoid changing this set up or letting your old domain expire.

In terms of setting up new redirects after migrating, because every URL of your old domain is redirected like-for-like, you’ll get the same 404 errors on your new domain and can address these.

And finally, the only URLs that didn’t appear to be automatically redirected to an equivalent on the new domain were images, with new URLs created on instead. The issue here is that you can’t redirect these, another quirk of Shopify redirects, which might be an issue if you have external backlinks or traffic to these image pages, which is very common for e-commerce websites. I’ll update this if/when I find a solution.

How to change your primary domain

Before you change your primary domain, you need to complete the following steps:

1. Add a domain to Shopify:

  • You can buy a domain through Shopify or transfer an existing domain in to simplify the process.
  • Automatically connect your third-party domain if you use Google Domains, GoDaddy, or 1&1 IONOS.
  • Manually connect your domain by changing the DNS settings. Point the A record to the Shopify address 23.227.38.65 and if necessary, change the Host name to the @ symbol. Point the CNAME record with www to shops.myshopify.com. (including the full stop at the end).

2. Verify that your domain has a Connected status on the Domains page in your admin. It might take up to 48 hours for your domain to be connected, and an SSL certificate will also be activated.

3. Change the primary domain:

  1. From your Shopify admin, go to Settings > Domains.
  2. Click the domain that you want to make the primary domain.
  3. Click Change domain type.
  4. Select Primary domain.
  5. Click Change domain type to save.

It’s as simple as that, and now we know that all like-for-like 301 redirects will be automatically set up too, you can rebrand or change your domain in no time at all.

Back to Insights.