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:
- Will it solve my problem ?
- 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’ }
{% endif %}
Appreciate your expert inputs on this.