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.


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.

  • <link rel="alternate" href="http://example.com/" hreflang="en" /> Will this code limit "example.com" to only english speaking countries like UK,AU,USA? – George Ortiz Sep 9 '15 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" – kqw Sep 10 '15 at 9:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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