Remove collections/all pages

Solved
Eli90
Pathfinder
125 4 15

Hi, 

although I do not use it on my Dawn theme shop, Shopify creates an all collections page automatically and I can't get rid of it (this is a default page coming from Shopify, wasn't created by me). Is there a way to get rid of it? it has negative influence on my SEO.

 

https://sugarfreeeu.com/collections/all

 

Thank you in advance

Accepted Solution (1)
omarhussain
Shopify Partner
32 5 6

This is an accepted solution.

you can put this in    theme.liquid  file after <title ></title> tag

View solution in original post

Replies 5 (5)
omarhussain
Shopify Partner
32 5 6

put this code in main-collection-product-grid.liquid 

and you can also remove this form google bot reading 


{% if collection.url == '/collections/all' %}
<meta name="robots" content="noindex,nofollow">
{% endif %}

 

 

 

{% if collection.url == '/collections/all' %}
  <script type="text/javascript">
    window.location = "your home link or where you want it to redirect";
  </script>
  {% endif %}

 

 

 

 

Eli90
Pathfinder
125 4 15

@omarhussain thanks a lot for replying ! where should I add it? 

received this message:

Unable to update the file

  • Invalid JSON in tag 'schema'
omarhussain
Shopify Partner
32 5 6

This is an accepted solution.

you can put this in    theme.liquid  file after <title ></title> tag

Eli90
Pathfinder
125 4 15

worked like magic! thx a lot!

Eli90
Pathfinder
125 4 15

@omarhussain I see that the en/collection .... pages are still there tho, how can I get rid of them please?