Google Updates hreflang Documentation to Address Quirk in Link Tag Attributes

June 13, 2024 at 5:22:42 AM

TL;DR Google updated their hreflang documentation to note a quirk in how some websites are using it which can lead to unintended consequences. The hreflang attribute specifies languages and belongs in the <head> section. Google found issues when multiple attributes are combined in one link element and updated their documentation to warn against this. The new guidance advises not to combine link tags for alternate versions of a page in a single link.

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 👇

The Only Digital Marketing Feed You'll Ever Need.

Stay informed your way. Tailored updates when and how you want them. 100% Free.

10,000+ Users

500+ Sources

1000+ Tools

Or

Related Posts

Google Updates URL Parameter Best Practices for SEO

Google Updates URL Parameter Best Practices for SEO

Google for Developers
Google for Developers

Official Source

Official Source

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

Official Source
Google Updates robots.txt Guidelines Clarifying Supported Fields and Format

Google Updates robots.txt Guidelines Clarifying Supported Fields and Format

Google Search Central
Google Search Central

Official Source

Official Source

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

Official Source
Chrome Launches CrUX Vis for Site Performance Insights

Chrome Launches CrUX Vis for Site Performance Insights

The Ultimate Google Analytics Audit Tool

The Ultimate Google Analytics Audit Tool

Sponsored
GA4 Auditor
GA4 Auditor

Verified Sponsor

Verified Sponsor

GA4 Auditor is a Verified Sponsor. Want to get featured here? Contact us.

Verified Sponsor
Google Chrome Ends Support for FID, Shifts Focus to INP Metric

Google Chrome Ends Support for FID, Shifts Focus to INP Metric

Google
Google

Official Source

Official Source

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

Official Source
Google Updates Indexing API Guidelines and Clarifies Quotas

Google Updates Indexing API Guidelines and Clarifies Quotas

Google for Developers
Google for Developers

Official Source

Official Source

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

Official Source
Google Advises Not to Worry  About Blocked URLs Being Partially Indexed

Google Advises Not to Worry About Blocked URLs Being Partially Indexed

John Mueller
John Mueller

Official Source

Official Source

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

Official Source
Google Enforces Canonical Tag Placement in Head Section for SEO

Google Enforces Canonical Tag Placement in Head Section for SEO

Chris Long
Chris Long

Top Creator

Top SEO Creator

Chris Long is a Top SEO Creator. Part of Swipe Insight Select, a curated list of top creators.

Top SEO Creator

Related Tools

GA4 Auditor logo

GA4 Auditor

Verified Tool

Verified Tool

GA4 Auditor is a Verified Tool. Want to get this badge? Contact us.

Verified Tool

Automated GA4 audits with actionable insights

Get Featured Here

Showcase your tool in this list.

Contact Us
Lighthouse logo

Lighthouse

Automated insights for web performance and SEO

SEO
GTmetrix logo

GTmetrix

Analyze and optimize your website performance

SEO
CanIRank logo

CanIRank

AI-driven SEO insights and action recommendations

SEO
JetOctopus logo

JetOctopus

Fast, limitless SEO crawling and log analysis

SEO