Getting A Better Understanding Of Hreflang

SMS Text

Many SEOs start off by looking after local clients. I offer my SEO Services to Melbourne (Australia not USA) based businesses with a strong focus on ranking in Melbourne and the SEO strategy for getting them ranked have a strong local flavour to it . But like with any business as they grow they want to tackle more markets and when they want to expand in to different markets including international that creates a slew of issues.

  • Do I stick with my current domain?
  • Do I create new sites with geo-targeted TLD’s?
  • Will there be duplicate issues with these pages spanned across multiple domains?
  • And so on …

When you start to look for answers you are bound to come across rel=”alternate” hreflang=”xx””

What is hreflang?



W3 has a details explanation of this attribute if you want to get in to the nitty gritty of things but if you want the short version the hreflang attribute allows the webpage to specify the language of the linked document. We are not limited to just tagging pages with a language, we can also specify the location. So does this really work I hear you ask. Let us try searching for ” GoogleHelp ” in Russia, Germany, Italy, Japan BUT for some reason UK search for UK english fails to trigger UK. (if someone from UK could test out searching for “Google Help” and report back that would be awesome . If you have any theories please do add them in the comments)

rel canonical hreflang conundrum? a.k.a the hreflang cheat sheet


Up until over a year ago, I felt like Penny listening to Sheldon Cooper when it came to Google and international because there was no clear indication as to what is the best way to go about doing international content but now I feel like Leonard Hofstadter. Hopefully you guys find this cheat sheet useful.

Assume this site offers multiple language pages but with

  • different content spread across multiple TLD targeted to each location: No Need to use hreflang
  • similar content but some important things like Price / shipping info / contact number are different : use hreflang
  • fully translated pages : use hreflang

Advice on the topic from Pierre Far (Webmaster Trends Analyst at Google) :

The idea of rel-alternate-hreflang is to help you signal to our algorithms that although these two pages have substantially the same content, the small differences between them are still important. Specifically, the small differences are relevant for users of a specific language (and in a country).

Extra Reading: Multi-regional and multilingual sites, hreflang

How to use hreflang

There are 3 ways in which you can use the hreflang attribute

  1. The head element on a webpage
  2. HTTP header
  3. Sitemap

Using hreflang as a HTML link element

Within the head attribute you add a link attribute with rel=”alternate” (used to specify the destination is an alternate representation of the current page) and hreflang=”language-region” (to specify the language and region of the destination page).

NOTE: you specify the language (in ISO 6391-1 format and the region which is optional in ISO 3166-1 Alpha 2 format.

Let us assume we have 3 versions of the site, which has similar content, but the pricing for the products are in local currency.

  • in Spanish independent of region ( )
  • in English targeted towards Aussie users ( )
  • page in English independent of region ( )

So the head section of the Spanish page will have

<link rel=”canonical” href=”” />
<link rel=”alternate” hreflang=”es” href=”” />
<link rel=”alternate” hreflang=”en-AU” href=”” />
<link rel=”alternate” hreflang=”en” href=”” />

The English page targeted towards Aussie users will have

<link rel=”canonical” href=”” />
<link rel=”alternate” hreflang=”es” href=”” />
<link rel=”alternate” hreflang=”en-AU” href=”” />
<link rel=”alternate” hreflang=”en” href=”” />

So once this is indexed and Google processes the hreflang tag it understands that for English speakers from AU there is a specific page on the site and when any other English speakers from anywhere else on the planet searches they are directed to the .com page.

So you might have figured out by now every language page must use rel=”alternate” and hreflang to identify all language versions including itself.

NOTE: the self-canonical link is not a part of hreflang statement and do NOT rel canonical the .com version of the page on all the different language pages, If you do that you can say goodbye to the local language pages from the SERP. You have to note that the canonical on AU page is to the AU version and on the Spanish Page to the Spanish version, we are NOT adding a canonical from all different pages to the .com version

Extra Reading: There has been quite a bit of confusion regarding the use of canonical and hreflang, this discussion between Richard Hearne, John Mueller, Pierre Far, Tom Anthony and more, should give you some insight on what is the best practice.

This is a good place to get acquainted with rel canonical if you need to read up on the topic.

PRO Tip: It’s a good idea to show the language switcher option on the page, so users can make that choice themselves if Google does not get it right. Using pretty flags are always a nice way to go about doing it :).


Using hreflang via HTTP header

If you can configure your server you can use rel=”alternate” hreflang=”xx” HTTP header to indicate the language preference for your webpage or other files like PDFs. The format to use is

Link: <>; rel=”alternate”; hreflang=”es”

The advantage of using this method is the fact that you can tag non HTML pages like PDF files and other media objects this way.

Using hreflang in Sitemaps

Using hreflang in Sitemaps I believe this is much simpler way to go about implementing hreflang. For one it avoids the extra lines in the code within your pages. Say you have 10 languages that you want to support that is 10 lines of code. Let us look at an example:

  •  Spanish users are targeted with ( )
  • Aussie users with ( )
  • US users with ( )

Now the XML sitemap to target uses using hreflang will look like

<?xml version=”1.0″ encoding=”UTF-8″?>
<urlset xmlns=”″ xmlns:xhtml=””>
<xhtml:link rel=”alternate” hreflang=”es”
href=”” />
<xhtml:link rel=”alternate” hreflang=”en-AU”
href=”” />
<xhtml:link rel=”alternate” hreflang=”en”

<xhtml:link rel=”alternate” hreflang=”es”
href=”” />
<xhtml:link rel=”alternate” hreflang=”en-AU”
href=”” />
<xhtml:link rel=”alternate” hreflang=”en”

<xhtml:link rel=”alternate” hreflang=”es”
href=”” />
<xhtml:link rel=”alternate” hreflang=”en-AU”
href=”” />
<xhtml:link rel=”alternate” hreflang=”en”

For each URL on the site you should create a separate url element which includes a loc tag indicating the page URLs, and an xhtml:link rel=”alternate” hreflang=”XX” sub-element for each and every alternate version of the page, including itself. For a huge site that supports multiple languages you can see how this sitemap can easily go crazy, it might also be a good idea to split these up by languages and place each of those in the language specific folder.

There are some 3rd party tools that lets you import your xml sitemaps and easily create hreflang version of the sitemap. Here are 2 of them : online version , download to your PC version

PRO Tip: don’t forget to test your sitemap for errors and submit the sitemap in GWT

hreflang FAQ

Q) Is this statement case sensitive? Eg: hreflang=”en-au” vs hreflang=”en-AU”?

A) No it’s not case sensitive, Google accepts both of them. That said the standard convention is to use hreflang=”en-AU” where the language is in lower case and the region in upper case.

Q) Can hreflang be cross domain?

A) Sure Can

Q) What If I have my main .com page on position one and if my spanish page is on page 3. If I hreflang my content will I lose out on position one ?

A) From my understanding hreflang does not affect ranking , so when some one searches for the page say from Spain then the position one page will display the Spanish page. Keep in mind this can have its own title and description that are useful for Spanish customers which could potentially increase CTR. I highly recommend going through this Hangout video by Pierre Far, which should cover quite a bit on this topic.


The title “International Strategy without hreflang is like asentencewithoutspaces” is a bit misleading I know , it was either that or “Using the rel-alternate-hreflang construct to tell Google the duplicate pages on your site is actually targeted towards users from different geo-location “ and I had to settle for the former. I am working towards improving my titles writing skills  and hopefully the next post gets a better one.

So yeah this is my 2nd post at SEJ, hopefully you guys find this useful. I promise to try and answer any questions you have about this post via the comments. I am also on Google+ if you are into SEO please do circle me and if you ever come down to Melbourne, give us a shout for a beer.

Saijo George
Saijo George works as a SEO Consultant in Melbourne offering SEO Services to various businesses in Melbourne, Australia. He helps Small Business and Enterprise Clients... Read Full Bio
Saijo George
Saijo George

Latest posts by Saijo George (see all)

Get the latest news from Search Engine Journal!
We value your privacy! See our policy here.
  • Steven Macdonald

    Great post Saijo!

    We implemented hreflang at Superofice (using HTML mark up) and have seen a great improvement for local sites that were previously being outranked by the more authoritative COM version.

  • Saijo George

    Thanks Steven

    That is great news :), if you don’t mind me asking what was the rough turn around time like .

    The reason I ask is that Google claims this is not a direct raking factor , but when other factors like click through rate from a region etc favors a result it will have +ve influence on ranking.

  • Ben

    Great article! In bed now but ill be sure to re-read it again tomorrow and apply it to my works website.

    We just released multiple international websites with only the Lang attrib on the HTML tag. Pretty sure google has penalized us, because around the same time as releasing those websites, we went from 2nd to 13th then to 57th, now back to like 12th(although we are always first in local map results, a natural listing seems to be better driver for traffic) . So we removed the international sites for the moment until we have another crack with one at a time lol!

  • Zuheb

    Excellent article. Although i have a single question and i am a little confused at this point.

    Id like to know if Hreflang can be applied if the website is in the same language (ie english) but contains pages for different regions. For Example: a few pages of the website (in english) would cater to US audience while a few other pages to UK, Canada, and India etc.

    Would Hreflang help in cases of websites where local languages are not used??


  • Astrid Groeneveld

    Hi Saijo,

    I am researching the hreflang tag and found your article. It’s very interesting… I am still not sure whether we need to use it or not. I am confused because of the following:

    In your examples you talk about and etc.

    However with our sites, every URL has a ccTLD, eg., and etc

    The content on all pages/sites is not a literal translation of each word, but in general is identical on all our domains. Do I have to install hreflang tags? And if so, why? And how?
    I hope you can help met out.


  • Cierra Simpson

    Hi Saijo!
    Thanks For sharing the information about Hreflang. Previous I had no Idea about it. But your article is easily understandable. I am really impressed by it 😛

  • Tyson Scammell

    I would like to appreciate your efforts that bring really nice work and also engage all people here to take opportunity for share their views 🙂

    Best regards.