d
Topic
Posts:
7
January 17, 2014
g
1
upvotes

How To Redirect 404 Error To Home Page or Non Shopify URL To Home Page? This post is outdated

Let's say I have a website www.example.com and this is designed by Shopify.

So how to redirect any non shopify URL for example- www.example.com/asjghjgwqsdjsjk to www.example.com.

Or any 404 error to www.example.com

Please Note: I have gone through 404 Redirects in this forum but it is not correct what I am looking for. It is written that if the product is out of stock then it will redirect to Home Page URL, which I don't want to do.

Your help highly appreciated and correct answer will be upvoted. Please share your knowledge.

i
Replies
Posts:
7
January 18, 2014

I am quite surprised to see that no Shopify Expert has not replied to my thread till now. Is this question so difficult to Shopify Experts?

Posts:
5840
January 18, 2014
g
2
upvotes

You can create URL directs on your Navigation page. This creates actual redirects recognized by search engines. Search engines learn about the new URL for a page. That feature does not work with wildcards.

For any 404 Not Found that isn't redirected with a store URL redirect, then you can send customers over to your home page by adding the following HTML as close as you can to your opening head tag in your theme.liquid file:

{% if template == '404' %}<meta http-equiv="refresh" content="0;URL={{ shop.url }}" />{% endif %}

 

Caroline from http://11heavens.com ∴ mllegeorgesand AT gmail DOT com
Posts:
7
January 20, 2014
g
1
upvotes

Thank you so much Caroline... It worked nicely.... Again thank you and have wonderful days always.....

Best Regards

Kalu