extra collections without duplicate content

Pathfinder
101 1 20

I added a bunch of collections, some automatic, some manual - and planned to add more! - so that I could highlight certain aspects of my products on the home page (new, best-selling).

 

Now I've come to understand that this has created duplicate content and an indexing mess. I had previously removed the "sort by" filtering option on my theme for some reason (and I've read it's not great for seo unless edited by an developer or a $20/m app). 

 

I've now blocked the two collections on my home page from indexing using the text below and it seems to be working. (I'll probably have to move one and add something else to my home page so that I have some unblocked content on that page.) I'd just like to know if this seems like a reasonable approach...to aid navigation and sorting with collections that are not indexed?

 

{% if collection.handle contains “your-text” %}

    <meta name="robots" content="noindex,nofollow">

    {% else %}

    <meta name="robots" content="index,follow">

{% endif %}

 

Thanks for any help!

Leila

LeilaCools.com

 

1 Like
Shopify Partner
49 9 20

Hey Leila,

That sounds like a very sensible approach for sculpting what pages you present to Google to be indexed. Three quick comments, though:


First, about

I'll probably have to move one and add something else to my home page so that I have some unblocked content on that page.

Noindex applies at the whole page level, so the text with product names/pricing on the main page are still indexed by Google, even if they come from a collection that is itself noindex-ed. The only thing you'd want to consider here is that you link to the "root" product page (eg /products/my-product) instead of to the product in the noindexed collection (eg /collections/my-noindexed-collection/products/my-product). 

 

Second, you may also want to remove the links to these noindexed collections from your /collections page. There are two reasons for this: (1) if they're just implementation details to make it easy to edit home page content, humans don't need to be able to navigate to them and (2) Google will use some of its crawl budget to fetch the page, only to then see the meta robots tag and ignore it.

Third, double check your Liquid changes -- it looks like you have conflicting meta robots tags on some pages, e.g. https://leilacools.com/collections/best-selling-products has two such tags, with contradictory values.

Hope that helps!

Code 402 Inc - Ecommerce Consulting in Kitchener, Ontario, Canada
1 Like
Pathfinder
101 1 20

Thanks again Code402. That's a lot of helpful info!

 

What you are saying about linking the products in the noindexed collection to the root product page sounds similar to what might be advised when using the sort function. While I'd love to have a number of collections for different product themes etc. the main purpose of the new and best selling collections is to make easy for the human to find them...so for that and the above reason, perhaps I should consider using sort. I will do some more research!

 

This is what I have in theme.liquid:

 

{% if handle contains '/wholesale-items' %}
<meta name="robots" content="noindex">
{% endif %}
{% if handle contains '-necklace-wholesale' %}
<meta name="robots" content="noindex">
{% endif %}
{% if collection.handle contains "newest-products" %}
<meta name="robots" content="noindex,nofollow">
{% else %}
<meta name="robots" content="index,follow">
{% endif %}
{% if collection.handle contains "best-selling-products" %}
<meta name="robots" content="noindex,nofollow">
{% else %}
<meta name="robots" content="index,follow">
{% endif %}

 

My very newbie guess would be that I should remove one or both of these: 

{% else %}
<meta name="robots" content="index,follow">

1 Like
Shopify Partner
49 9 20

You're on the right path with the liquid changes, you just need to tweak it slightly. Rather than having four if/endif blocks, use a single one, and use elsif to capture the additional cases. This ensures that only a single meta tag will be printed out, because in a given if/elsif/endif block, only a single path is ever evaluated.

For example, something like:

{% if handle contains '/wholesale-items' %}
<meta name="robots" content="noindex">
{% elsif handle contains '-necklace-wholesale' %}
<meta name="robots" content="noindex">
{% elsif collection.handle contains "newest-products" %}
<meta name="robots" content="noindex,nofollow">
{% elsif collection.handle contains "best-selling-products" %}
<meta name="robots" content="noindex,nofollow">
{% else %}
<meta name="robots" content="index,follow">
{% endif %}
Code 402 Inc - Ecommerce Consulting in Kitchener, Ontario, Canada
1 Like
Pathfinder
101 1 20

Thank you!

That was my next guess;) ha ha

0 Likes

Do you mean Canonical? If yes, it should because you to tell to search robots that the same product but different model or series to preventing the duplicate content.

0 Likes