How to hide a page on your Shopify store from search engine results
Adding a “noindex” tag to the page hides it from search engines, while leaving it public and available for visitors to access. You can add this tab into the <head>
section of your store’s theme.liquid layout file. You need to include some code to noindex particular pages.
- From your Shopify admin, go to Online Store > Themes.
- Find the theme you want to edit, and then click Actions > Edit code.
- Click the
theme.liquid
layout file. - To exclude a specific page, paste the following code in the
<head>
section. Depending on the type of page, you will need a little editing code.
Search page:1{% if template contains 'search' %}<meta name="robots" content="noindex">{% endif %}
A specific page:1{% if handle contains 'page-handle-you-want-to-exclude' %}<meta name="robots" content="noindex">{% endif %}
Make sure that you replacepage-handle-you-want-to-exclude
with the correct page handle. - Click Save.
Hi, I see the same explanation on multiple websites, but nobody explains what the correct syntax is when you want to exclude two or more pages. Or where to put this code in the section (before or after the meta-tags)? Thank you!