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

Top-Notch Google Ads Audit Tool

Top-Notch Google Ads Audit Tool

Featured
Chrome DevTools Introduces CPU Throttling Calibration for Real-World Performance Testing

Chrome DevTools Introduces CPU Throttling Calibration for Real-World Performance Testing

Chrome for Developers
Chrome for Developers

Official Source

Official Source

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

Official Source
Google Search Enhances Speed with Speculation Rules API for Faster Navigation

Google Search Enhances Speed with Speculation Rules API for Faster Navigation

Google
Google

Official Source

Official Source

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

Official Source
Google Sunsets Web Vitals Extension as DevTools Integration Completes

Google Sunsets Web Vitals Extension as DevTools Integration Completes

Chrome for Developers
Chrome for Developers

Official Source

Official Source

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

Official Source
Google Updates PageSpeed Insights with Enhanced CrUX Data Transparency

Google Updates PageSpeed Insights with Enhanced CrUX Data Transparency

Google releases guidance on faceted navigation and its impact on crawling efficiency

Google releases guidance on faceted navigation and its impact on crawling efficiency

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
Google Emphasizes HTTP Caching Importance for Efficient Web Crawling

Google Emphasizes HTTP Caching Importance for Efficient Web Crawling

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
Google Clarifies How Robots.txt Works for Managing Website Crawling

Google Clarifies How Robots.txt Works for Managing Website Crawling

Related Tools

Markifact logo

Markifact

Verified Tool

Verified Tool

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

Verified Tool

Marketing Workflows Powered by AI

Featured
Marketing Auditor logo

Marketing Auditor

Verified Tool

Verified Tool

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

Verified Tool

Automated audits for Google Ads and Analytics.

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

Get Featured Here

Showcase your tool in this list.

Contact Us