Canonical URL issue- yes we have the new tag in theme.liquid

Highlighted
Tourist
24 0 0

Hey all,

 

Im having some canonical URL issues. I have the Shopify tag

 <link rel="canonical" href="{{ canonical_url }}" />

in my themes code.. however every which version of the product link is still showing up. I don't want...

 

https://www.spadeeleven.com/collections/dresses/products/miss-maverick-stretch-suede-dress-pale-blue

https://www.spadeeleven.com/collections/as-by-df/products/miss-maverick-stretch-suede-dress-pale-blu...

https://www.spadeeleven.com/products/miss-maverick-stretch-suede-dress-pale-blue

competing with each other... 

 

I want you to reach and see "https://www.spadeeleven.com/products/miss-maverick-stretch-suede-dress-pale-blue" no matter how you traveled there.. whether through the dresses collection, designer collection, or search page. thats the ONLY link I want indexed and ranked, instead of all three competing.

 

Lets take the "Cable mohair sweater by Loewe" on "https://www.modaoperandi.com" for example. No matter how you travel to it- whether it be through the Loewe collection page, the sweater collection page, or the search page, you ALWAYS arrive at "https://www.modaoperandi.com/loewe-ss19/cable-mohair-blend-sweater" -

 

NOT /sweaters/cable-mohair-blend-sweater

NOT /new-in/cable-mohair-blend-sweater

 

its ALWAYS /loewe-ss19/cable-mohair-blend-sweater

 

Thats what I want! how do I fix this? 

0 Likes
Highlighted
Shopify Partner
1777 211 370

Hey Grace,

 

In that case the only option I see feasible is to build that canonical URL. If you are familiar with coding, should be an easy one, adding something like (you should be checking whether you are on a product page):

{% assign custom_canonical_url = shop.url | append: '/products/' | append: product.handle %} 

 

Sergiu Svinarciuc | CTO @ visely.io
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution!
- To learn more about the awesome stuff we do head over to visely.io or our blog
0 Likes
Highlighted
Tourist
24 0 0

Im familiar, but im not widely versed. where would i out this snippet of code, and would there be something i need to remove? using TURBO theme. 

0 Likes