Canonicalization Question

Solved
Highlighted

Not sure if this is Shopify functionality, or something that has already been applied by the business I've started working for...

 

When I view a collection page - https://gooseandganderltd.com/collections/t-shirts

The canonical is https://gooseandganderltd.com/collections/t-shirts

 

All good

 

However on that page I can filter the collection (Tag driven)

https://gooseandganderltd.com/collections/t-shirts/graphic-tee

The canonical is https://gooseandganderltd.com/collections/t-shirts/graphic-tee

 

Yet the page keeps the format and most content of the parent (just removes a few products).

 

Surely the filtered collection would still use the canonical of the collection?

Barry Kirley
https://www.linkedin.com/in/barrykirley/
0 Likes
Highlighted
Tourist
12 1 2

This is an accepted solution.

No, this is pretty standard behavior in themes.

 

If you want to do it like that, look for the code that writes the canonical tag and replace it with something like this:

 

{% if template contains 'collection' and current_tags %}
    <link rel="canonical" href="{{ shop.url }}{{ collection.url }}" />
{% else %}
    <link rel="canonical" href="{{ canonical_url }}" />
{% endif %}

That said - Google only takes the canonical tag as a suggestion. So even if you do this, google will still return your filtered pages as results, if it thinks that's the smart thing to do.


So, it might just be better to leave it as is, and let google figure it out. I don't know for certain.

I usually make sure to add "Filtered by xxxxx" or "Tagged xxxxx" into a page title or a heading tag, just to make sure google sees it and understands that it's a subpage.

1 Like