How can I create 301 redirects from a different domain?

Hi,

I’m trying to create 301 redirect from a different domain eg https://abc.xyz.com (development environment) to https://mydomain.com

I had a look at redirects in shopify, and there is no provision to create custom URL redirects

See here for the official help docs on URL redirects: https://help.shopify.com/en/manual/online-store/menus-and-links/url-redirect

You’re only able to do specific URL redirects for individual pages (not the domain as a whole).

So you could redirect “yourcompany.com - This website is for sale! - yourcompany Resources and Information.” to “yourcompany.com - This website is for sale! - yourcompany Resources and Information.”.

If you have multiple domain names, you can add up to 20 of them to your Shopify store.

https://help.shopify.com/en/manual/domains/add-a-domain/connecting-domains

All of your ‘extra’ domains that you add will forward users to the main/primary domain you’re using.

For example, if you have 3 domains:

mystore1.com (set as the primary domain within Shopify)

mystore3.com

Then mystore2.com and mystore3.com would being people to your site, showing mystore1.com as the URL.

To use your example, if you have abc.xyz.com and you want it to point to mydomain.com, then you would add both domains to your Shopify store (following the steps in the help doc linked above), and then you would set your main/primary domain as ‘mydomain.com’ within the Domains Settings page within the Shopify admin.

Once you get the traffic from the old domain moved over, you’ll need to remap your page URLs. There are some built in redirect tools in Shopify, but I have found it best to install an app that catches 404 errors and allows you to create redirects to the correct new pages.