Trying to hide one of the page in Google’s search results.
When you put the code:
{% if handle contains 'page-handle-you-want-to-exclude' %}
<meta name="robots" content="noindex">
{% endif %}
Which way is the right way?
-
Do you add a “full” handle to that code i.e: www.XYZ.com/pages/thank-you
-
Only /pages/thank-you
-
Or only: thank-you
@Kjankko-US May this help you. Click Here.
I have read that - and my code is from that page @DelightCart
Only wondering whats is the handle to put in that code. If my site’s URL is: www.XYZ.com/pages/thank-you
Do I add:
- a “full” handle to that code i.e: www.XYZ.com/pages/thank-you
{% if handle contains 'www.xyz.com/pages/thank-you' %}
{% endif %}
- Only /pages/thank-you
{% if handle contains '/pages/thank-you' %}
{% endif %}
- Or only: thank-you
{% if handle contains '/thank-you' %}
{% endif %}