How to implement a noindex?

Highlighted
New Member
25 0 0

Hi I want to be able to noindex certain pages, for example PPC landing pages, how would I go about this?

 

Thanks,

 

Stephen.

0 Likes
Highlighted
Shopify Staff (Retired)
Shopify Staff (Retired)
289 0 218

Hey Steph!

I'd do this by excluding the handle with this snippet added to your theme.liquid between the <head> and </head> tags:

{% if handle contains 'page-handle-you-want-to-exclude' %}
<meta name="robots" content="noindex">
{% endif %}

You can grab the handle for any page in the Page itself.

For multiple pages, just use 'or':

if handle contains 'page-handle-you-want-to-exclude' or 'some-other-handle'

will work. Hope that helps!

0 Likes
Highlighted
New Member
25 0 0

Absolutely  brillinat, thanks very much!

0 Likes