Don't index size (auto) collections

New Member
1 0 0

I have a lot of size-based collections that are being indexed by Google. I'd like to add a noindex flag for those without having to do it by hand for each collection.

 

URLS look like:

/collections/all-tops/size-6

I think the best way to do this would be to check for a tag containing "size", then slap the noindex on.

 

I just don't have the syntax correct. I know how to get the tag:

 

{% for tag in current_tags %} {{ tag | handleize }}{% endfor %}

but I'm stuck on connecting it to this:

 

{% if collection and [[help here]] contains "size" %}

Also is this even the best way to do this?

 

0 Likes