Indexing problem

Highlighted
Tourist
6 0 1

Hi,
I want to hide my policy sites from Google, so I added the following code to the head of theme.liquid:

{% if handle contains 'terms-of-service' or 'privacy-policy' or 'legal-notice' %}
<meta name="robots" content="noindex">
{% endif %}

The result is that all of my pages are not indexed now. What am I doing wrong?

0 Likes
Highlighted

Hi Bunuzn,

Change the if statement accordingly, as shown in the example below on how to use the or statement

{% if product.type == "Shirt" or product.type == "Shoes" %}

in your case

 

{% if handle contains 'terms-of-service' or handle contains 'privacy-policy' or handle contains 'legal-notice' %}

 

Then you need to wait 1-4 weeks for google to update your index. You can request an update via the google search management console

But it will still take some time before google index updates it.

 

If my answer was helpful please Like and Accept my post as the Solution
Need help customizing your store? Contact me on email at Defineify@gmail.com
0 Likes