The fact that there are many websites that cater to a global audience, has prompted Google to better its support for multilingual content with improvement in two basic cases. These scenario being- multiregional websites that have the same content in various regions, with only minor changes like prices; and those multiregional websites that have product/services pages in a different language for every country (French/German etc).
For these sites, Google has announced a new markup element to define multilingual content to Google bots. To specify language and location, the link element rel="alternate" hreflang link element is being supported to handle multiregional content.
As Google is quoted, “The hreflang attribute can specify the language, optionally the country, and URLs of equivalent content. By specifying these alternate URLs, our goal is to be able to consolidate signals for these pages, and to serve the appropriate URL to users in search. Alternative URLs can be on the same site or on another domain.”
For the sites with same content in the same language, but targeted at different countries, Google has put forward the rel="canonical" link element.
As Google is quoted, “We’ll use that signal to focus on that version in search, while showing the local URLs to users where appropriate. For example, you could use this if you have the same product page in German, but want to target it separately to users searching on the Google properties for Germany, Austria, and Switzerland.”
This is how Google has explained the usage with examples:
- http://www.example.com/ – contains the general homepage of a website, in Spanish
- http://es-es.example.com/ – is the version for users in Spain, in Spanish
- http://es-mx.example.com/ – is the version for users in Mexico, in Spanish
- http://en.example.com/ – is the generic English language version
<link rel="alternate" hreflang="es" href="http://www.example.com/" />
<link rel="alternate" hreflang="es-ES" href="http://es-es.example.com/" />
<link rel="alternate" hreflang="es-MX" href="http://es-mx.example.com/" />
<link rel="alternate" hreflang="en" href="http://en.example.com/" />
These link elements are to be used for specific URLs and not the home page. For more information please see Help Center article about this topic.