Google Updates hreflang Documentation to Address Quirk in Link Tag Attributes

June 13, 2024 at 5:22:42 AM

Google Updates hreflang Documentation to Address Quirk in Link Tag Attributes

Google updated their hreflang documentation to address a quirk in how some websites use it, which may lead to unintended consequences in Google's processing.

hreflang Link Tag Attributes

The <link> HTML attribute communicates data to browsers and search engines about linked resources relevant to the webpage, such as CSS, JS, favicons, and hreflang data. The hreflang attribute specifies languages and should be placed in the <head> section of the document.

Quirk in hreflang

Google observed unintended behavior when publishers combine multiple attributes in one link element. This prompted an update in their documentation to highlight this issue. The changelog states:

"Clarifying link tag attributes: Clarified in our hreflang documentation that link tags for denoting alternate versions of a page must not be combined in a single link tag."

Documentation Changes

The documentation now explicitly warns against combining link tags for alternate representations of a document. Below are the changes:

Old Version:

"Put your <link> tags near the top of the <head> element. At 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 that the links are inside the <head> element."

New 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 that the links are inside the <head> element. Additionally, don’t combine link tags for alternate representations of the document; for example, don’t combine hreflang annotations with other attributes such as media in a single <link> tag."

Implications

While Google did not specify the consequences of this quirk, it implies that combining attributes in a single link tag could cause issues, warranting attention from publishers and SEOs. For more details, refer to the newly updated documentation on Google's website.

Q&A

Have more questions on this topic? Ask our AI assistant for in-depth insights.

Read more from sources 👇

Want Personalized Digital Marketing Insights at Your Preferred Time?

Our Smart Newsletter brings you the latest insights on the topics you love, delivered at your preferred time and frequency.

Discover More

TikTok Users Can Now Download Videos without Watermark

TikTok Users Can Now Download Videos without Watermark

Looker Studio to Add Native Microsoft Excel Connector

Looker Studio to Add Native Microsoft Excel Connector

Sean Zinsmeister
Sean Zinsmeister

Official Source

Official Source

Sean Zinsmeister is a Official Source. The source has been verified by Swipe Insight team.

Official Source
BigQuery Now Allows Drag-and-Drop Tabs

BigQuery Now Allows Drag-and-Drop Tabs

Google Cloud
Google Cloud

Official Source

Official Source

Google Cloud is a Official Source. The source has been verified by Swipe Insight team.

Official Source
Google Ads Updates Gambling and Games Policy to Include Lottery-Courier Ads in 33 States

Google Ads Updates Gambling and Games Policy to Include Lottery-Courier Ads in 33 States

Google
Google

Official Source

Official Source

Google is a Official Source. The source has been verified by Swipe Insight team.

Official Source
Microsoft Ads Launches Property Center and Global Lodging Campaigns

Microsoft Ads Launches Property Center and Global Lodging Campaigns

Microsoft Advertising
Microsoft Advertising

Official Source

Official Source

Microsoft Advertising is a Official Source. The source has been verified by Swipe Insight team.

Official Source
Google Merchant Center Broadens Conversion Tracking Scope Trending ️‍🔥

Google Merchant Center Broadens Conversion Tracking Scope

Google
Google

Official Source

Official Source

Google is a Official Source. The source has been verified by Swipe Insight team.

Official Source