Implementation of href-lang now available via XML sitemaps
Google has announced today that the href-lang markup for specifying equivalent-language content can now be implemented via XML sitemaps.
When Google announced this new annotation back in December, they outlined a link element, implemented either as a HTML header, or as a HTML element on each of the pages in question.
This approach wasn’t ideal for a couple of reasons. Firstly, making changes to HTML code can be an issue in some cases – particularly on large websites where constraints may be in place. And secondly, the annotations add significant code-bloat if you’re dealing with many regions/languages.
The new XML sitemap integration is very straight forward. The example outlined in Google’s blog post can be seen below:
The web support for href-lang has also been updated by Google, providing examples of implementation.
While there is still some uncertainty around href-lang, Pierre Farr clarified a couple of points during his session at International Search Summit last week:
1. The href-lang annotation doesn’t have to specify direct copies; simply equivalent pages. The example given, was if you have an English support section, you may want to use this annotation to specify the German support section on your website.
2. The annotation can be used to denote multiple languages in a single region. For example, Arabic speakers/searchers that may be in the UK.
There have been limited examples of successful href-lang implementation from what we’ve seen – so I’d certainly be interested to hear from anyone who has tried and tested it. Let us know in the comments if you have.