We currently have an online store bound to the domain us.xxxx.com. Additionally, we have a headless project built on Shopify, deployed on Netlify, and bound to the domain www.xxxx.com. Currently, we can redirect any page on us.xxxx.com without issue, except for the homepage. For example, for https://us.xxxx.com/pages/affiliate, we know that a 301 redirect to https://www.xxxx.com/affiliate can be configured via Shopify admin → Online Store → URL Redirects.
However, on Online Store → URL Redirects, we are unable to perform a 301 redirect for the homepage, as this is not allowed. Our sole wish is to redirect the root path (i.e., the homepage) of us.xxxx.com to www.xxxx.com using a 301 redirect, rather than using a client-side JavaScript redirect.
Hello @jepson
There is no direct way to redirect your online store to your headless. Similar thing happed with one of my client where I have suggested to use Javascript.
They are happy with solution and using it for more than 1 and half years
Solution: You need to open your theme and edit the code of theme.liquid
Apply this condition on top
{% if request.design_mode %}
So in theme customization mode you will see your online store but when someone access it your online store they will redirect to the main headless domain.