Multilingual Site Markup For Sitemaps

Many websites provide their information in different languages. Multiregional website sustantially the same content e.g. English web pages for United Kingdom, USA, Australia and canada.

Last year, Google introduced new markup for multilingual content. The hreflang link element was rel= “alternate”.

“The hreflang attribute can specify the language, optionally the country, and URLs of equivalent content,” the company explains on the Webmaster Central blog. “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.”

Here are examples of how you may use it respectively:


<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/" />

Now Google has announced that they are support for specifying the rel-alternate-hreflang annotations in Sitemaps. Here are examples:

<url>
  <loc>http://www.example.com/en</loc>
<xhtml:link 
    rel="alternate"
    hreflang="de"
    href="http://www.example.com/de" />
<xhtml:link
    rel="alternate"
    hreflang="en"
    href="http://www.example.com/en" />
</url>
<url>
  <loc>http://www.example.com/de</loc>
<xhtml:link
    rel="alternate"
    hreflang="de"
    href="http://www.example.com/de" />
<xhtml:link
    rel="alternate"
    hreflang="en"
    href="http://www.example.com/en" />
</url>

For more details on how to use this, see this Google internationalization help forum .