Google’s John Mueller, how Google handles hreflang signal when appearing on both on-page HTML and sitemap. It was discussed by John Mueller in the Google Search Central live stream.
Google’s John Mueller discusses how hreflang signals are handled when directives appear in a sitemap as well as on-page HTML.
The topic of potentially conflicting hreflang signals is discussed in the Google Search Central live stream from November 27.
If the hreflang is present in the sitemap and codes of web pages, then Google combine these signals.
“What would happen there is we would combine those. From our point of view hreflang is not something where we say you can only have one language or country version on one page, but rather you can have multiple country versions on the same page.
And you can have multiple different levels. So you could say this is the page for English in Singapore, English in US, English in UK, and you have a different page for English in Australia, for example.
You can have one page with multiple country/regional targeting on them. So if you have some hreflang in the HTML, and some in the sitemap, then we would try to combine that and add that together.
That means that if you have multiple different country versions across those different things we would just combine that into one setup.”
The exception occurs in this rule and that only happens when signals are not linked with each other, which means one country version of an hreflang directive appears on the page, but that same directive is assigned to a different page in the sitemap.
“The one place where it would get confusing, or where we would see it as conflicting is if you have one country language version on the page and you use the same country language version for a different page in the sitemap file. That’s one situation where our systems would probably have to guess.”
“As far as I know we don’t have any prioritization where we say sitemaps are better than HTML, or better than the headers. But rather we would see this doesn’t work and we would probably drop that pair [of conflicting signals].”