Google updates Hreflang documentation
Clarifying How to Specify Alternate Page Versions. The update seems to be a response to a common confusion among website owners.
Google this week updated its hreflang documentation to clarify a common misconception. Previously, the documentation did not explicitly state that website owners should not combine link tags for alternate webpage versions into a single HTML element.
Hreflang is an HTML attribute that website owners use to tell search engines, like Google, about different language versions of the same webpage. This helps search engines deliver the most relevant version of a webpage to users based on their language settings.
Combining link tags can create confusion for Google and potentially lead to inaccurate results. For instance, a website might have separate mobile and desktop versions of a webpage, both available in German. In this scenario, it would be incorrect to combine the mobile and desktop URL references within a single link tag using the hreflang
attribute.
Correct Implementation of Hreflang
The following example demonstrates the proper way to implement hreflang for separate mobile and desktop versions of a webpage in German:
<link rel="alternate" hreflang="de-CH" href="https://m·example·com/ch/de/page" />
<link rel="alternate" media="handheld" href="https://m·example·com/ch/de/page" />
In this example, there are two separate link tags:
- The first link tag specifies the desktop version of the webpage in German (
hreflang="de-CH"
) and its corresponding URL. - The second link tag specifies the mobile version of the webpage (
media="handheld"
) using the same URL as the desktop version.
Impact of Hreflang on Search Results
Hreflang implementation helps search engines understand the relationship between different versions of a webpage. This can improve the search experience for users by ensuring they see the most relevant content based on their language preference.