All things Shopify and commerce
Can we create URL redirects through code in shopify?
Hello,
I hope you are well.
I have reviewed your requirement and in order to redirect the URL we need to replace the URLs from the backend and request google to crawl for the same.
We have redirected one domain to the primary domain and it's done but we need to redirect it to the particular page of the primary domain.
We have redirected one domain to the primary domain and it's done but we need to redirect it to the particular page of the primary domain.
For example I have already redirect www.abc.com to www.xyz.com but now I have to redirect www.abc.com to www.xyz.com/page (on a particular page of xyz site)
It's not working
We have redirected www.crafttculture.com to www.habitt.com through AWS panel. Now we want to redirect http://www.crafttculture.com to https://habitt.com/pages/craftt
Also the above mentioned is not working.
Remove AWS panel redirect and Add below code before </head> tag in theme.liquid file.
{% if request.host == 'http://www.crafttculture.com' or request.host == 'www.crafttculture.com' %}
<script>
window.location.href = 'https://habitt.com/pages/craftt';
</script>
{% endif %}
It is still not working
You mean I should add www.crafttculture.com url to www.habitt.com shopify store account Domain?
We have done this already
User | RANK |
---|---|
44 | |
42 | |
42 | |
28 | |
21 |
On our Shopify Expert Marketplace, you can find many trusted third party developers and fr...
By Arno Nov 27, 2023You've downloaded the Search & Discovery app from the Shopify App store, and as you're ...
By Skye Nov 8, 2023The year-end shopping season is just around the corner. Is a flash sale on your radar? Are...
By Jasonh Nov 6, 2023