Why are my no-index tagged pages still being indexed?

Hi everyone,

I have added a no-index tag into the code of my website, however, those pages are still indexed. Is my code incorrect? Is it the correct way to list handles to exclude?

{% if handle contains 'pages/history-quotes', 'pages/artwork-requirements', 'pages/launch-offer',  'pages/faqs' %}

{% endif %}

Hi @Exhibit-Central

Aibek is here from Speedimize.io

Welcome to Shopify Community.

You have a syntax error. Try inserting the code below:

{% if handle == 'pages/history-quotes' or handle == 'pages/artwork-requirements' or handle == 'pages/launch-offer' or handle == 'pages/faqs' %}

{% endif %}

The handle keyword works everywhere. If you suddenly have problems, you can use page.handle like this
Although there should be no problems. To check, you can open the browser’s dev tools, and find this noindex element. This element should only be on those specified pages.

You will have to wait for some time until everything is indexed by Google.

Hope this will help you.

This way I’m getting Liquid error: unknown operator handle Liquid error.

Then try to use the page.handle:

{% if page.handle == ‘history-quotes’ or page.handle == ‘artwork-requirements’ or page.handle == ‘launch offer’ or page.handle == ‘faqs’ %}

{% endif %}

We have edited the urls themselves. You can simply copy the code above and paste it inside the tag

Hope that helps you.