Happening now! Shopify Community AMA: Building a Marketing Budget with 2H Media | Ask your marketing budget questions now!

How to set canonical tags for subfolder hierarchies?

How to set canonical tags for subfolder hierarchies?

Drops
Tourist
6 0 1

Hi there,

 

shopify generates new pages with every filter that is applied, which leads to a massive amount of pages and I would wanna change this with canonical tags.

 

For example: this is the main page that should be indexed by Google https://drops.wine/collections/herbert-zillinger

Whereelse thise pages, generated through filter should have a canonical tag linking back to the main page
https://drops.wine/collections/herbert-zillinger/weiss
https://drops.wine/collections/herbert-zillinger/weiss+classy

 

Does anyone have an idea how to set canonical tags always the the same subfolder hierachy? So every page that comes after this /collection/vendor/... should have a canonical tag linking to the subfolder (vendor) before.

That means google would only rank e.g. this page
https://drops.wine/collections/herbert-zillinger

and all other pages after should have a canonical tag, so their aren't indexed
https://drops.wine/collections/herbert-zillinger/weiss
https://drops.wine/collections/herbert-zillinger/weiss+classy

These rules should also apply for all other pages of (in my case) wine makers.

Can some help?
Thank you very much!
Chris 

Replies 0 (0)