Hreflang tags

Excursionist
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 www.poppyscrafts.co.uk and www.poppys-crafts.com

 

<link rel="alternate" hreflang="x-default" href="{{ canonical_url | replace: shop.domain, 'www.poppyscrafts.co.uk'}}" />
< link rel="alternate" href="{{ canonical_url | replace: shop.domain, 'www.poppyscrafts.co.uk' }}" hreflang="en-GB" />
< link rel="alternate" href="{{ canonical_url | replace: shop.domain, 'www.poppys-crafts.com'}}" hreflang="en-US" />
< link rel="alternate" href="{{ canonical_url | replace: shop.domain, 'www.poppyscrafts.co.uk' }}" 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 https://liquify.design/all/add-dynamic-hreflang-tags-shopify-liquid/

thankyou in advance :)

0 Likes
Highlighted

Hey,

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: https://liquify.design ★★
0 Likes