In this article I show you how to prevent search engines like Google from indexing Shopify archive pages.

For the purpose of this blog post, an archive page is considered any page that contains and links to other pages of a website, including product, sub-category, or article pages.

One of the main reasons why you would want to prevent search engines from indexing archive pages is keyword cannibalization.

Meaning, sometimes Google ranks these pages for relevant keyword searches concerning your website products or services.

Generally speaking, you would not want these pages ranked, especially if you have better-looking, more comprehensive content pages that you want to be shown for the given keyword search.

By preventing Google from indexing archive pages, you will essentially give search engines fewer and better options for which page to show for a given query.

But now, let's see the step-by-step process for preventing search engines from indexing archive pages from your Shopify store:

1. From the Shopify admin, click on Online Store. This will default to Themes

2. Click on the three dots (...) next to the Customize button

3. Select Edit Code from the dropdown menu

4. Open the theme.liquid file from within the Layout folder

5. Find the closing </head> tag and past the following code right above:

{% if canonical_url contains '?page=' %} <meta name="robots" content="noindex" /> {% endif %}