Canonicals for Tagged Collection Pages

Tourist
9 0 4

I've been researching this topic endlessly and thought I had arrived at a solution but Screaming Frog indicates my solution was not successful.

Problem: I used tags to filter my collections pages - by everything from subcategory to brand to product features.  The result, I discovered, was the creation of dozens and dozens, maybe hundreds, of additional collection URLs for each possible permutation of tag filters.  I understand this is problematic for SEO.  I would like to make the collection page URL, with no tag filters, the canonical.

Proposed Solution:  I found the following code described somewhere as the solution:

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

However, I crawled my site with Screaming Frog and found that the canonical link element is still listed as the URL with the tags included.  The crawler does recognizes the "noindex" instruction but it still seems to be listing the canonical link element as the full URL with the tag filters.

Example of Tag Filter URL:

https://www.vitamingrocer.com/collections/vitamin-b/subcategory_vitamin-b-1-theamine+formulation_cap...

Desired Canonical:

https://www.vitamingrocer.com/collections/vitamin-b

3 Likes

Make sure the double-quotes in the code used in your theme are "straight quotes", and not “curly quotes”. 

I had copied the exact same code you are using in your post, but from a page that rendered the quotes as curly quotes. I didn't catch it in the theme.liquid (the visual difference is very subtle). 

Once I pulled the code into a code editor, it was apparent that they were curly quotes, and using the straight-quotes version immediately fixed the rel=canonical not being altered, just as you were experiencing. 

Copy the version below to make sure you are using code that uses straight quotes. 

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

 

Monster, creature & cryptozoology patches, buttons & stickers.
0 Likes

Hi there, we've developed a theme and filter page technology that overcomes one of Shopify's biggest technical SEO issues. You can learn more here: https://www.integritycommerce.com/

Integrity Search & Integrity Commerce® - the ONLY themes in the world fully optimized filter/tag pages. The most technically advanced Shopify themes for SEO.
3 Likes
New Member
6 0 0

i am having this exact issue!  Ive tried the code but they still show as indexed pages.  Does the update require time to work or should it be instant?  This is driving me insane!!!

0 Likes

Hi there,

 

We have developed the only theme in the world that allows you to fully optimize filter/tag pages with unique:

 

- URL's

- Meta titles

- Meta descriptions

- H1's

- Indexable content

- Alt= tags

 

You can learn more about this world's first tech here: https://www.aaptheme.com

 

Feel free to reach out here if you have any questions - kma@integritysearch.co.uk

 

Kristin

 

Integrity Search & Integrity Commerce® - the ONLY themes in the world fully optimized filter/tag pages. The most technically advanced Shopify themes for SEO.
0 Likes

@mdbing What is an example page? And what canonical code are you using?

 

The moment you save your theme, it will update on your website. However, it will take Google an unknown amount of time to crawl each of the pages to see the updated version where it recognizes pages as noindex.

Run Google Shopping ads? Get the free definitive guide to Google Shopping for Shopify (no optin required): https://www.digitaldarts.com.au/google-shopping
0 Likes
Highlighted
New Member
6 0 0
Hey! Thanks for your reply. Im talking about tagged pages which are created for every product tag in a collection.

For example. My botanical art print collection canonical page should be and it does not have correct meta in search...

https://www.theunderdogprintshop.com/collections/botanical-art-prints

But im seeing tagged pages ranking better and using the correct meta data such as below.

https://www.theunderdogprintshop.com/collections/botanical-art-prints/blue

I think these tagged pages are being indexed and ranked higher than the canonical page.

I think this is causing my SEO performance to be negatively affected. Thing is i have noticed these for about 2 months and guess what, ive not had any sales in 2 months. Im close to giving up. I dont think i have done anything out of the ordinary with the site.

Please help!
0 Likes

Hi @mdbing, here's where your problem lies. You have incorrect metadata on the page and you have not 1, but 3 canonical tags on the page which are all conflicting with each other. You have 2 self canonicalizing tags and one correct one.

 

If you canonical tag is correct [use the 1st one] then you won't need the noindex tag. 

 

Whichever app you are using is not outputting the meta title data correctly, assuming you are using one. 

 

meta botanicals.png

Integrity Search & Integrity Commerce® - the ONLY themes in the world fully optimized filter/tag pages. The most technically advanced Shopify themes for SEO.
0 Likes
New Member
6 0 0
hey! thanks for the reply. Im not using any app to output the meta data.
it is all done in shopify. How would i go about fixing this?

I did update my theme to debut .13 (for multi currency) but had some orders
after that. Then from the 10th september...nothing and i noticed these
issues coming up.

my default the theme had the tag filter in the collection page which i
turned off

Any additional help with this would be highly appreciated.

Many thanks
0 Likes
No problem at all. Glad to help. Something has overwritten your basic code somewhere down the line, either an APP or by manually editing the code. And Debut theme (no disrespect) is a very basic theme when it comes to this level of SEO. In terms of getting this fixed, I see you have 2 options. 1 - You could pay someone like us to investigate and fix the issue on an hourly rate or 2 - You could upgrade your theme to the best Shopfiy theme for SEO: www.aaptheme.com Obvious implications for both here but it does look like you have major technical seo issues here with your existing theme that need sorting. Further reading: https://www.integritysearch.co.uk/blog/5-major-technical-seo-issues-with-shopify/ https://www.integritysearch.co.uk/blog/shopify-seo/ https://www.integritysearch.co.uk/blog/best-shopify-theme-for-seo/ https://www.integritycommerce.com/blogs/theme-blog/shopify-product-collection-page-filters-why-they-... Feel free to reach out if you'd like to discuss further - I'm the owner and founder for both Integrity Search and Integrity Commerce - kma@integritysearch.co.uk Thanks!
Integrity Search & Integrity Commerce® - the ONLY themes in the world fully optimized filter/tag pages. The most technically advanced Shopify themes for SEO.
0 Likes