Stop Google from Indexing Search result, Variant, Filter, Sort By URL

Stop Google from Indexing Search result, Variant, Filter, Sort By URL

BP-Town
Tourist
4 0 0

The store I handle has 3K pages but the indexed pages show 70K+ due to  inactive pages, URL variation pages and query parameters pages. How do I stop Google from doing that?

 

I saw this video: https://www.youtube.com/watch?v=PiTeu7RgCtE and came up with the following code to be added to the header of the theme.liquid.

 

Questions:
1. Will it solve my problem ?
2. Will there be any negative SEO impact that I need to be aware of?

Code:

{% if template contains ‘search’ or handle contains ‘variant=’ or handle contains ’size’ or handle contains ’color’ or handle contains ’sort_by=’ or handle contains ’page=’ or handle contains ’vendor=’ or handle contains ’/search’ }

<meta name=“robots” content=“noindex”/>

{% endif %}

Appreciate your expert inputs on this.

 

 

Replies 0 (0)