How to Hide a Page from Search Engines

On This Page

TABLE OF CONTENTS

Getting Started

 

When search engines list results for specific web searches, they will crawl the internet in search of new or specific data. When your webpage is being crawled, your store's robots.txt  file will block page content that may lower the efficiency of your store's SEO strategy. For more information, check out Google's article on PageRank.

 

If you have added new pages or updated pages on your store's site and you want Google to recrawl your site, you can submit an appeal directly to Google. For more information, check out Ask Google to Recrawl Your URL

 

Your robots.txt file will direct and dictate which pages should or shouldn't be requested to view when bots crawl through URLs. For example, because it is unique to a specific customer or customer account, a customer's Cart Page will be exempt from being listed on search engine results

 

Shopify dictates and runs a general robots.txt.liquid template across all store. Customization is possible, however. For more information, see Editing robots.txt.liquid

 

Excluding Pages from Search Engine Results Lists

In order to hide specific pages from search engine listings, however, you can follow a much more simple approach. To begin doing so, follow these steps:

  1. From your store's MyShopify page, select Online Store Themes
  2. Find the specific theme being edited and select the ellipses (three dots) icon for more settings
  3. From this drop-down menu, select Edit Code
  4. From here, find and select the theme.liquid layout file on the left side of the screen
  5. To exclude a template searches, paste the following code into the <head> section:
    • {% if template contains 'search' %}
      <meta name="robots" content="noindex">
      {% endif %}
  6. To exclude a specific page from searches, past the follwing code into the <head> section:
    • {% if handle contains 'page-handle-you-want-to-exclude' %}
      <meta name="robots" content="noindex">
      {% endif %}
  7. Make sure that the page-handle-you-want-to-exclude portion is replaced with the correct page handle
  8. Click Save

 

 

 

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request