1

How do I properly put hreflang tags?

I would like to target 3 different languages not just English.

  • example.com/de
  • example.com/fr
  • example.com/it

And my main website example.com is in English and it should target everything else worldwide.

1 Answer 1

1

http://www.internationalseomap.com/hreflang-tags-generator/ is useful.

For example, it told me to put this HTML in the <head> section for French in France.

<link rel="alternate" href="http://example.com/fr" hreflang="fr-fr" />

If you don't specify countries you can put this in your specific <head> section:

<link rel="alternate" href="http://example.com/fr" hreflang="fr" />
<link rel="alternate" href="http://example.com/de" hreflang="de" />
<link rel="alternate" href="http://example.com/it" hreflang="it" />
<link rel="alternate" href="http://example.com/" hreflang="en" />

This will be independent from countries according to Google's documentation.

2
  • <link rel="alternate" href="http://example.com/" hreflang="en" /> Will this code limit "example.com" to only english speaking countries like UK,AU,USA? Sep 9, 2015 at 21:43
  • No. Google's documentation about hreflang="en": "For example, you may have specific URLs for English speakers in Ireland (en-ie), Canada (en-ca), and Australia (en-au), but want all other English speakers to see your generic English (en) page"
    – the
    Sep 10, 2015 at 9:07

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.