Hreflang tags

24 0 4

Hi there :)

 can someone check for me that i am doing this correct (trying to add hreflang to my site) my two domains are and


<link rel="alternate" hreflang="x-default" href="{{ canonical_url | replace: shop.domain, ''}}" />
< link rel="alternate" href="{{ canonical_url | replace: shop.domain, '' }}" hreflang="en-GB" />
< link rel="alternate" href="{{ canonical_url | replace: shop.domain, ''}}" hreflang="en-US" />
< link rel="alternate" href="{{ canonical_url | replace: shop.domain, '' }}" hreflang="en" />

and then im supposed to add this code into the head section of my theme ?

this is where i got my info from

thankyou in advance :)



It's Joe - I wrote the article you followed.  Just answering for anyone else going down this route.

It states quite clearly in the article about hreflang tags in Shopify - code needs to go in the head section.

For anyone else messing around with hreflang tags and not really knowing what they are doing: you should really hire a Shopify developer to do this as there's a few things to consider.  E.g. is the URL structure the same and are any apps adding hreflang tags.  Then you need to check them in the source code...etc to make sure they are correct.  We've seen people make some pretty fundamental errors with these.  

Also if you have multilingual apps (which are - in my experience - rubbish for SEO) then you'll have to think about that content and how Google will treat it.  And then there's also the duplicate content issue many people with multiple Shopify sites face.



★★★ Need help setting up your Shopify store? Hire me here: ★★