“hreflang” tag is a portion of code we put inside the html pages to tell the search engines about the language of our active content. This tag is very useful in an international context, and here are some tricks to use it well.
The “hreflang” tag is useful only in an international context. If your site targets only one country audience, you don’t need to read the following:
Cases of use of:
If your web site cover several languages
If your web site cover several countries that speak the same language (eg Morocco, Emirate, Saudi Arabia…)
If your web site provide weather forecasts, you will create a page with the weather in ° Celsius for Morocco for example and a page in ° Fahrenheit for Emirate.
In this case Google need signal from the page to detect that these two pages has different content and decide which page should be displayed (depending on the location of the user).
Where we should put the hreflang?
The webmaster must put this tag in the “Header” section of each version of your web site, such this example below:
Each page must have tags for all the languages / geographic areas you want to cover.
What is the default page for hreflang?
To set a default page for your versions you will need to use the property “x-default”, example
List of ISO 639-1 codes
refer to ISO 639-1 codes (source wikipedia)
How to generate hreflang?
Herein a little tool that allows to simply generate the HTML code to integrate in your pages:
How to test hreflang implantation?
Here again there is a tool that will allow you to validate the implementation of your tag.
Do not forget to use the Hreflang property to optimize your international SEO.