Your safety is important to us. If you notice any suspicious emails that appear to come from Shopify, please forward them to safety@shopify.com. Visit the Help Center page on phishing for more information.

Hiding a page from search engines

Search engines like Google constantly crawl the internet in search of new data. When your site is being crawled, your store's robots.txt file blocks page content that might otherwise reduce the effectiveness of your SEO strategy by stealing PageRank.

The robots.txt file is located at the root directory of your Shopify store's primary domain name. For example: johns-apparel.com/robots.txt.

Although you can't edit the content of your store's robots.txt file, you should be aware of the content that it blocks from search engines. For example, the shopping cart page is blocked from search engines because you want customers to find your product pages before the cart page.

You can hide pages that are not included in your robots.txt file by customizing the <head> section of your store's theme.liquid layout file. You will need to include some code to noindex particular pages.

To hide a page from search engines:

  1. Find the theme you want to edit, click Actions, and then click Edit HTML/CSS.

    Click edit html css
  2. Click the theme.liquid layout file.

  3. To exclude the search template, paste the following code in the <head> section:

    
    {% if template contains 'search' %}
    <meta name="robots" content="noindex">
    {% endif %}
    
  4. To exclude a specific page, paste the following code in the <head> section:

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

    Make sure that you replace page-handle-you-want-to-exclude with the correct page handle.

  5. Click Save.

Want to discuss this page?

Visit the Shopify Community

Ready to start selling online with Shopify?

Try it free