How can I resolve href lang issues with Impulse theme?

YasminAshraf
New Member
4 0 0

 

Hi,

 

My website shows href lang issues in the site audit. It doesn't show issues with the product links, but shows canonical and self referencing tag issues for product links with collection name in it. I am using Impulse theme and the href lang tags are auto generated from the theme and there is no section for editing. Please see the attached for reference.

 

 

YasminAshraf_0-1712225773026.png

 

Thanks in advance.

Replies 2 (2)

Victor
Shopify Staff
2507 229 531

Hi @YasminAshraf,

 

What theme are you using on your storefront? What tool did you use to audit your site here?

Victor | Social Care @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit the Shopify Help Center or the Shopify Blog

YasminAshraf
New Member
4 0 0

Hi @Victor .

 

Thanks for the response. I am using the Impulse theme. And in the theme the product url is defined as product.url | within: collection. So, it causes the hreflang tag and self reference tag issues in SEMrush audit. 

 

When I added  {% assign canonical_product_url = product.url | within: collection %} instead of <link rel="canonical" href="{{ canonical_url }}" > it solves the issue, but causes duplicate content issues for all product urls as they are pointing to different urls. Can we keep the product urls with collection name in it and solve the canonical and duplicate content issues?

 

Thanks in advance.