1

I have these 3 directories for different countries. I can add an hreflang on WordPress, but I don't know where to implement it on my Shopify site.

https://example.com is for the USA

https://nl.example.com is for Netherlands

https://example.com/en-de is for Denmark

Can I set up this through the main domain (https://example.com/), or do I have to put this code in all the directories? And, where is this option?

8
  • It appears you have to add them to the <head> section of your theme in theme.liquid. There are other methods, such as using Custom Fields, covered in this.
    – dan
    Commented Apr 19, 2022 at 14:11
  • I check theme.liquid there I do not find my existing hreflang tag. If I go to via source code then I find my hreflang tag. I want to change this code, because there is some error. Commented Apr 19, 2022 at 14:33
  • 1
    It appears that you might have a translation app installed since it can be translated to Dutch. The above linked to article states, There are some Shopify apps that add Hreflang tags to your pages for you. Translation apps such as Weglot and Langify will automatically generate your Hreflang tags and add them to your pages. So check if you have a translation app installed, and see if removing or disabling that removes the hrefrelang links as well.
    – dan
    Commented Apr 19, 2022 at 16:06
  • 1
    I use the G-Translate app, maybe here is the problem. docs.google.com/document/d/… This app generates this code. Commented Apr 19, 2022 at 16:35
  • 1
    Finally I resolve it. Thanks for your valuable comments and I add an answer here. Commented Apr 20, 2022 at 18:27

1 Answer 1

2

When you create a subdomain or subdirectory on the Shopify website, Shopify automatically generates an hreflang tag on your store for that subdomain or subdirectory. You can't edit it through theme.liquid, the only option is you have to remove your subdirectory or subdomain from under: Settings > Market

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.