Google warns of the quirk in some Hreflang implementations

Google hreflang quirk

Google updated its hreflang documentation to note a quirk in how some websites use it that (presumably) can have unintended consequences with how Google processes it.

Attributes of the hreflang link tag

is an HTML attribute that can be used to communicate data to the browser and search engines about linked resources relevant to the web page. There are several types of data that can be linked, including CSS, JS, favicons, and hreflang data.

In the case of the hreflang attribute (link element attribute), the purpose is to specify languages. All link elements belong to section of the document.

Quirk In hreflang

Google noticed that there is some unwanted behavior that happens when publishers combine multiple attributes in a link element, so they updated the hreflang documentation to make this more familiar.

The changlog explain:

“Clarification of link tag attributes
What: Clarified in our hreflang documentation that link tags to indicate alternate versions of a page should not be combined into a single link tag.

Why: While debugging a report from a site owner, we noticed that we don’t have this quirk documented.”

What has changed in the documentation?

There was a change to the documentation that warns publishers and SEOs to be aware of this issue. Those who audit websites should take this into account.

This is the old version of the documentation:

“Put yours on tags near the top of the item At least the tags must be inside a well-formed placeholder section, or before any element that may cause the to close prematurely, as for example

or a tracking pixel. When in doubt, paste the code of your rendered page into an HTML validator to make sure the links are in item.”

This is the recently updated version:

“The tags must be inside a well-formed placeholder section of the HTML. When in doubt, paste the code of your rendered page into an HTML validator to make sure the links are in item Also, don’t combine link tags for alternative representations of the document; for example, do not combine hreflang annotations with other attributes such as media into one Tag.”

Google’s documentation didn’t say what the consequence of the quirk is, but if Google was debugging it, that means it caused some sort of problem. It’s something seemingly minor that could have an outsized impact.

Read the recently updated documentation here:

Tell Google about localized versions of your page

Featured image by Shutterstock/Mix and Match Studio

[ad_2]

Source link

You May Also Like

About the Author: Ted Simmons

I follow and report the current news trends on Google news.

Leave a Reply

Your email address will not be published. Required fields are marked *