Not sure about how to correctly generate a hreflang tag? Lots of marketers know about the hreflang tag, but we still see so many people not implementing it correctly. Emily Mace, Head of International SEO, tackles the issue of the hreflang tag in her presentation from the recent BrightonSEO conference (April 2016). She will discuss how to make the most of hreflang tags, whether on page or in your sitemap file, and show you the common mistakes to avoid.
2. What is a hreflang tag anyway?
Language content to different countries
Resolves duplicate content
Identifies regional differences in language (Spanish for Spain and
Spanish for Mexico)
3. What isn’t a hreflang tag?
The same as a canonical tag
A geotargeting tool which sends people to a location site by
default – it’s not IP serving or like IP Serving
4. Who understands the hreflang tag?
Who doesn’t?
Use the HTML Language code for these!
Understanding the Hreflang tag
6. How to use – on page
In <head> section
List all versions of a page available
Syntax
<link rel="alternate" href="http://example.com/en-ie" hreflang="en-ie" />
<link rel="alternate" href="http://example.com/en-ca" hreflang="en-ca" />
<link rel="alternate" href="http://example.com/en-au" hreflang="en-au" />
<link rel="alternate" href="http://example.com/en" hreflang="en" />
7. How to use – sitemap
Same as on page just coded as XHTML:Link
<url>
<loc>http://www.example.com/english/</loc>
<xhtml:link
rel="alternate"
hreflang="de"
href="http://www.example.com/deutsch/"
/>
<xhtml:link
rel="alternate"
hreflang="de-ch"
href="http://www.example.com/schweiz-deutsch/"
/>
</url>
8. Which way to choose?
Smaller sites
Larger sites, e-commerce sites, etc.
12. Can’t I just use canonical tags?
Won’t help your international users see the right version
of the site and could lead to pages not being indexed
No
Não
NeinNai Nu
Niet
Non
Nei
NaiTidak
Nage
Nie
Nil
Aniyo
Nej
没有
няма
না
Dili
GeenJo
አይ
ال
ոչ
Yox
Ez
Ne
Не
Innò
Ingen
Nee
Neniu
Ei
Hindi
Όχι
નં
ʻAʻole
לא
नह ीं
Tsis
Nem
Engin
Níl
ノー
Ora
ಯಾವುದ ೇ
жоқ
គ្មា ន
아니오
Na
ບໍ່ ມີ !
Nē
Tsia
ഇല്ല
Nru
Kahore
नाह
Үгүй ээ
မရှိသ ေးပါ
कु नै
نه
ਕੋਈ
Нет
Leai
Chan eil
Cheنه
නැත
இல்லை
తోబుట్టు వుల
Hayır
Немає
نہیں
Yo'q
KhôngHayi
ניין Ko si
Cha
13. I’ve got IP Serving – that’ll work right?
JUST NO!
15. Get your language codes right
<link rel="alternate"
href="http://example.com/se" hreflang=“se-se" />
Swedish is SV not SE
16. Get your language codes right
<link rel="alternate"
href="http://example.com/at" hreflang="at-at" />
They speak German in Austria – not Austrian
17. Get your country codes right
Some aren’t what you’d think
Israel's code is?
South Africa’s code is?
18. Get your country codes right
Some aren’t what you’d think
Israel's code is?
IS is Iceland and IL is Israel
South Africa’s code is?
SA is Saudi Arabia and ZA is South Africa
19. Don’t make up countries
<link rel="alternate"
href="http://example.com/ar" hreflang=“ar-
ar" />
AR is Argentina – NOT ARABIA
<link rel="alternate"
href="http://example.com/de" hreflang=“de-
eu" />
EU is not a country – this won’t target German speakers in
Europe!
20. Don’t forget the page you’re on
Often see people leaving out the current page
Listing alternatives only works if you include the current
page
Leave that out and the search engines will potentially
ignore all the other hreflang tags for the content
21. Don’t overcomplicate things
English .eu domain name hreflang tags
<link rel="alternate" href="http://example.eu" hreflang="en-de" />
<link rel="alternate" href="http://example.eu" hreflang="en-be" />
<link rel="alternate" href="http://example.eu" hreflang="en-ch" />
<link rel="alternate" href="http://example.eu" hreflang="en-pt" />
<link rel="alternate" href="http://example.eu" hreflang="en-fi" />
And on and on and on
One page for all those locations??????
22. Don’t overcomplicate things
Try this…..
<link rel="alternate" href="http://example.eu" hreflang="en" />
But really?
People want content in their language, not English –
thanks!
24. What’s the X-default option?
This is my original website right?
The canonical one which is most important?
The one to serve to people who I’ve not covered….
27. Use real URLs
Don’t use URL aliases
Don’t use URLs which redirect
All URLs in the hreflang should be the live version of the
page else you’ll confuse Google
28. No returns!
No Return Tag Errors – Google Search Console’s
favourite moan
Linking all over the place
French
Services Page
English
Services Page
English Home
Page
29. No returns!
Not neatly from one thing to the same thing
English service
page
French service
page
30. No Mans Land code
Code goes in the <head> not anywhere else
Certainly not in no man’s land
</head>
<link rel="alternate" href="http://example.com/at"
hreflang=“de-at" />
<body>