Hi Guys
We recently acquired a new client and after running a crawl of the site we uncovered a number of URLs that are close duplicates of existing Collection Pages and are in Google's Index. See example below.
https://www.cherrymelon.co.za/collections/tops
https://www.cherrymelon.co.za/collections/types?q=tops
The second URL is the issue and I want to remove them permanently.
Now I have 2 questions:
- How were these pages created as I cannot find them anywhere in the back-end
- Is it possible to remove them completely?
Been struggling with this for a while.
Hello!
I guess the easiest way would probably to do something like this in the head of theme.liquid.
@HerokuLiee wrote:Hello!
I guess the easiest way would probably to do something like this in the head of theme.liquid.
{% if handle contains 'types' %}<meta name="robots" content="noindex">{% endif %}
Thanks for your response. Why only quoting 'types' and not the rest of the handle?
Also how did these URLs get created? Basically i have one of these extra for every Collection i have.
Probably just the way your theme filters collections.
https://shopify.dev/docs/themes/liquid/reference/objects/handle
I think handle will only return the handle part of the URL not the entire URL. If you needed to get the entire URL you'll probably have to do it in JS
There is a "native" way of adding no index for a product.
Please see: https://shopify.dev/tutorials/manage-seo-data-with-admin-api
You need to create a Metafield with the following values:
"namespace" : "seo"
"key" : "hidden"
"value" : 1
"value_type" : "integer"
User | Count |
---|---|
25 | |
20 | |
17 | |
16 | |
15 |