Hreflang tags

Highlighted
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
Shopify Expert
9918 75 1438

Hi there,

This post doesn't relate to the Shopify Script Editor App so I'd assume you've posted this in the wrong forum section. You'll get better responses if you post in a related section so I'm going to move your post into the design section instead. (why).

You'll have a greater chance of it being answered in there.

★ Winning Partner of the Build a Business competition. ★ http://freakdesign.com.au
0 Likes