stop "all" collection being indexed

Excursionist
42 0 11

Hi,

 

Is there any way to stop the "all" collection being indexed by google?

 

Thanks

0 Likes

Hi,

Sure, What you can do is in the file theme.liquid write the following where all the meta-tags are present.

 

{% if template contains 'collection' %}
<meta name="robots" content="noindex">
{% endif %}

Check here for more information:- https://help.shopify.com/en/manual/promoting-marketing/seo/hide-a-page-from-search-engines

 

Let me know if you have any issues.

 

Thanks,

Sagar Khadke 

Have something to say? Or need to say Hi! just mail me at sagar.khadke03@gmail.com or visit https://sagarkhadke.myshopify.com
0 Likes
Excursionist
42 0 11

Great, thanks.

 

Is it definitely 'template'?  Or should it be 'handle'?

 

Thanks

 

Rob.

0 Likes
Highlighted

Hi,

Its template.

 

Thanks,

Sagar Khadke

Have something to say? Or need to say Hi! just mail me at sagar.khadke03@gmail.com or visit https://sagarkhadke.myshopify.com
0 Likes
Excursionist
42 0 11

ok great, thanks

0 Likes