Managing localized blog posts for hreflang
December 18, 2023Hreflang Errors Can Be prevented
January 28, 2024Hreflang Link Elements vs. Link Rel= Alternate
There seems to be some confusion over these two elements. I think it is caused by the SEO community co-opting the name of the original hreflang link element for a more straightforward explanation. We originally wrote about this issue in 2016 when working with the Adobe AEM team after our testing tool generated some incorrect errors for large sites. We found some websites used the original HREFlang in the body of pages to designate different language versions in their country locator, especially for non-ASCII friendly languages.
Hreflang Link Elements
The HREFLang link element is NOT the same as the one for Search Engines that SEOs want you to use to disambiguate the language region of a country. The Hreflang Link element uses the A Element to designate the language of the content represented by the link to browsers and other user agents, in the early days of the internet, web browsers struggled with content not in Latin-based. If they moved from an English page to a Japanese or Russian page, the browser would often show jumbled or corrupt text on the screen. The solution was to both predesignate the language of the content so the browser to apply the correct language encoding for either indexing or presenting to human readers.
In the example below, the website has integrated the Hreflang Link Element into their Country Locator, which is in a pull-down. Unfortunately, this is incorrect as it indicates the country and NOT the language. Both versions of Hreflang are language-specific.
Another example of confusion is that the development team has sometimes integrated the country and country language as if this were for search engines. Ensure your developers read the HREFLang Link specification on W3C, which stipulates that the two-letter ISO Language code be used.
Hreflang Link Rel=Alternate Tags
I have seen a few of these implementations lately, so someone must have suggested it to webmasters. The HREFLang Element, if you are using it for Search Engines to disambiguate the language region for your website, must use one of the established methods of implementing hreflang, which is either in the <head> tag of the HTML page, the HTTP response header, or in an hreflang XML sitemap to be understood. It CANNOT be added anywhere else on the page.