How do I manually set a canonical URL for duplicate product pages?

How do I manually set a canonical URL for duplicate product pages?

paperandsons
Tourist
10 0 3

Hi there, 

I have two product pages with almost the same content, so the idea is to use a canonical to reference from product A to product B.

As I dont't want to install an app, what is the easiest way to do this manually ?

I assume I need some modifications in the theme.liquid file.

 

my "main" product is: https://www.paperandsons.de/products/oak-kraftpapier-rucksack and the product with "dulplicated content" is "https://www.paperandsons.de/products/oak-kraftpapier-rucksack-black-edition"

Can anybody support with a code snippet ?

 

Thanks 

Sam

 

 

Reply 1 (1)
paperandsons
Tourist
10 0 3

Hi, sure.

Help is highly appreciated.

How can I fix this ?