Multilingual and multinational site annotations in Sitemaps
Stay organized with collections
Save and categorize content based on your preferences.
Thursday, May 24, 2012
In December 2011 we
announced annotations
for sites that target users in many languages and, optionally, countries. These annotations define
a cluster of equivalent pages that target users around the world, and were implemented using
rel-alternate-hreflanglink elements
in the HTML of each page in the cluster.
Based on webmaster feedback and other considerations, today we're adding support for specifying
the rel-alternate-hreflang annotations in
sitemaps.
Using sitemaps instead of HTML link elements offers many advantages including smaller page size
and easier deployment for some websites.
To see how this works, let's take a simple example: We wish to specify that for the URL
https://www.example.com/en, targeting English language users, the equivalent URL targeting German
language speakers https://www.example.com/de. Up till now, the only way to add such annotation is
to use a link element, either as an HTTP header or as HTML elements on both URLs like this:
Briefly, the new sitemaps tags shown in bold function in the same way as the HTML link tags, with
both using the same attributes. The full technical details of how the annotations are implemented
in sitemaps, including how to implement the xhtml namespace for the link tag, are in our
new Help Center article.
A more detailed example can be found in our new Help Center article, and if you need more help,
please ask in our brand new
internationalization help forum.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],[],[[["\u003cp\u003eGoogle Search now supports specifying \u003ccode\u003erel-alternate-hreflang\u003c/code\u003e annotations in sitemaps, offering advantages like smaller page size and easier deployment compared to using HTML link elements.\u003c/p\u003e\n"],["\u003cp\u003eThis update allows webmasters to define a cluster of equivalent pages targeting different languages and countries, improving the user experience for international audiences.\u003c/p\u003e\n"],["\u003cp\u003eThe new sitemaps tags function similarly to HTML link tags, using the same attributes to indicate language and country targeting for localized content.\u003c/p\u003e\n"],["\u003cp\u003eDetailed information on implementing \u003ccode\u003erel-alternate-hreflang\u003c/code\u003e annotations in sitemaps can be found in the updated Help Center documentation and the internationalization help forum.\u003c/p\u003e\n"]]],["The core update is the introduction of `rel-alternate-hreflang` annotations within sitemaps, in addition to existing HTML link elements, for multilingual websites. This allows specifying equivalent pages for different language users. Sitemaps provide advantages like smaller page sizes and easier deployment. The new method uses `\u003cxhtml:link\u003e` tags within `\u003curl\u003e` tags in sitemaps, mirroring the functionality and attributes of HTML link tags. Technical details are available in their Help Center.\n"],null,["# Multilingual and multinational site annotations in Sitemaps\n\n| It's been a while since we published this blog post. Some of the information may be outdated (for example, some images may be missing, and some links may not work anymore). Check out our documentation about [localized sites](/search/docs/specialty/international).\n\nThursday, May 24, 2012\n\n\nIn December 2011 we\n[announced](/search/blog/2011/12/new-markup-for-multilingual-content) annotations\nfor sites that target users in many languages and, optionally, countries. These annotations define\na cluster of equivalent pages that target users around the world, and were implemented using\n[`rel-alternate-hreflang` `link` elements](/search/docs/specialty/international/localized-versions)\nin the HTML of each page in the cluster.\n\n\nBased on webmaster feedback and other considerations, today we're adding support for specifying\nthe `rel-alternate-hreflang` annotations in\n[sitemaps](/search/docs/crawling-indexing/sitemaps/overview).\nUsing sitemaps instead of HTML link elements offers many advantages including smaller page size\nand easier deployment for some websites.\n\n\nTo see how this works, let's take a simple example: We wish to specify that for the URL\nhttps://www.example.com/en, targeting English language users, the equivalent URL targeting German\nlanguage speakers https://www.example.com/de. Up till now, the only way to add such annotation is\nto use a link element, either as an HTTP header or as HTML elements on both URLs like this: \n\n```\n\u003clink rel=\"alternate\" hreflang=\"en\" href=\"https://www.example.com/en\" \u003e\n\u003clink rel=\"alternate\" hreflang=\"de\" href=\"https://www.example.com/de\" \u003e\n```\n\nAs of today, you can alternately use the following equivalent markup in sitemaps: \n\n```\n\u003curl\u003e\n \u003cloc\u003ehttps://www.example.com/en\u003c/loc\u003e\n \u003cxhtml:link\n rel=\"alternate\"\n hreflang=\"de\"\n href=\"https://www.example.com/de\" /\u003e\n \u003cxhtml:link\n rel=\"alternate\"\n hreflang=\"en\"\n href=\"https://www.example.com/en\" /\u003e\n\u003c/url\u003e\n\u003curl\u003e\n \u003cloc\u003ehttps://www.example.com/de\u003c/loc\u003e\n \u003cxhtml:link\n rel=\"alternate\"\n hreflang=\"de\"\n href=\"https://www.example.com/de\" /\u003e\n \u003cxhtml:link\n rel=\"alternate\"\n hreflang=\"en\"\n href=\"https://www.example.com/en\" /\u003e\n\u003c/url\u003e\n```\n\n\nBriefly, the new sitemaps tags shown in bold function in the same way as the HTML link tags, with\nboth using the same attributes. The full technical details of how the annotations are implemented\nin sitemaps, including how to implement the xhtml namespace for the link tag, are in our\n[new Help Center article](/search/docs/specialty/international/localized-versions).\n\n\nA more detailed example can be found in our new Help Center article, and if you need more help,\nplease ask in our brand new\n[internationalization help forum](https://support.google.com/webmasters/threads?hl=en&thread_filter=(category:international_seo)).\n\n\nWritten by\n[Pierre Far](/search/blog/authors/pierre-far),\nWebmaster Trends Analyst"]]