All things Shopify and commerce
Hi Guys.
I really need some help regarding redirecting from one store to another.
I have two Shopify stores A and B. A has a lot of traffic that goes to that domain, B is a fairly new site and we want all traffic from A to be diverted over to B. Its a rebrand with a completely new site.
I know I can upload a redirect CSV to store A with all the redirects BUT I can't redirect the homepage of A to B, Shopify won't allow a redirect of the homepage.
I don't want to make store A have a different primary domain, I simply want all traffic from store A flow to store B and maintain all the SEO work that has been done on A. Do I need to do something with my domain provider swell as Shopify?
Thanks for your help.
Sam
Solved! Go to the solution
This is an accepted solution.
Hi @samgwatts
From an SEO perspective, it's not recommended to redirect the site to a different domain. This will hamper your SEO in the long run. However, if the main requirement, i.e., to redirect users from the home page to a different domain, exists, we can add the following codes to the theme.liquid file.
<script>
if(window.location.pathname == "/"){
window.location = "##NEW STORE URL HERE##"
}
</script>
Note: Replace "##NEW STORE URL HERE##" with the URL of the new site where you would like to redirect.
Steps to add JS:
Step 1: Go to Online Store > Themes > Active theme > Edit
Step 2: Search for "theme.liquid"
Step 3: Add the CSS above "</head>"
If you require further help to optimize your store, please don't hesitate to reach out. If you find this information useful, a Like would be greatly appreciated. And if this solves the problem, please Mark it as Solution!
Best Regards,
Mangit
This is an accepted solution.
Hi @samgwatts
From an SEO perspective, it's not recommended to redirect the site to a different domain. This will hamper your SEO in the long run. However, if the main requirement, i.e., to redirect users from the home page to a different domain, exists, we can add the following codes to the theme.liquid file.
<script>
if(window.location.pathname == "/"){
window.location = "##NEW STORE URL HERE##"
}
</script>
Note: Replace "##NEW STORE URL HERE##" with the URL of the new site where you would like to redirect.
Steps to add JS:
Step 1: Go to Online Store > Themes > Active theme > Edit
Step 2: Search for "theme.liquid"
Step 3: Add the CSS above "</head>"
If you require further help to optimize your store, please don't hesitate to reach out. If you find this information useful, a Like would be greatly appreciated. And if this solves the problem, please Mark it as Solution!
Best Regards,
Mangit
That's awsome. Totally did the trick!
Thank you.
By investing 30 minutes of your time, you can unlock the potential for increased sales,...
By Jacqui Sep 11, 2024We appreciate the diverse ways you participate in and engage with the Shopify Communi...
By JasonH Sep 9, 2024Thanks to everyone who participated in our AMA with 2H Media: Marketing Your Shopify St...
By Jacqui Sep 6, 2024