fbpx

Google Alerts Webmasters to Hreflang Implementation Issues

2 min read

Google has updated its Hreflang documentation to highlight a quirk in the way some websites are using it. This quirk could lead to unintended consequences in how Google processes these tags.

 

Hreflang Link Tag Attributes

 

The <link> tag is HTML element that conveys various types of data to browsers and search engines about linked resources related to a webpage. This data can include CSS, JavaScript, favicons, and hreflang information. The hreflang attribute, specifically an attribute of the <link> element, indicates a webpage’s language and regional targeting. All <link> elements, including those with hreflang attributes, should be placed within the <head> section of the HTML document.

 

Quirk in Hreflang

 

Google has identified an unintended behavior that occurs when publishers combine multiple attributes in a single <link>element. To address this, Google has updated the Hreflang documentation to raise awareness.

The changelog explains:

 

Clarifying Link Tag Attributes

What: We have clarified in our hreflang documentation that link tags for indicating alternate page versions must not be combined in a single link tag.

Why: While debugging a report from a site owner, we noticed this quirk was not documented.

 

What Changed in the Documentation

 

One change to the documentation warns publishers and SEOs to watch out for this issue. Those who audit websites should take notice of this.

 

This is the old version of the documentation:

“Put your <link> tags near the top of the <head> element. At a minimum, the <link> tags must be inside a well-formed <head> section or before any items that might cause the <head> to be closed prematurely, such as <p> or a tracking pixel. If in doubt, paste code from your rendered page into an HTML validator to ensure the links are inside the <head>element.”

 

This is the newly updated version:

“The <link> tags must be inside a well-formed <head> section of the HTML. If in doubt, paste code from your rendered page into an HTML validator to ensure the links are inside the <head> element. Additionally, don’t combine link tags for alternate document representations; for example, don’t combine hreflang annotations with other attributes such as media in a single <link> tag.”

Google’s documentation didn’t specify the exact consequences of the quirk, but the fact that it required debugging suggests it did cause some issues. This seemingly minor detail could have a significant impact.

 

If you need help, consider checking out our monthly SEO packages and let the experts help you.

Shilpi Mathur
navyya.shilpi@gmail.com