{"id":26178,"date":"2024-06-12T21:50:30","date_gmt":"2024-06-12T21:50:30","guid":{"rendered":"https:\/\/afreeurl.com\/?p=26178"},"modified":"2024-06-12T21:50:34","modified_gmt":"2024-06-12T21:50:34","slug":"google-warns-of-the-quirk-in-some-hreflang-implementations","status":"publish","type":"post","link":"https:\/\/afreeurl.com\/?p=26178","title":{"rendered":"Google warns of the quirk in some Hreflang implementations"},"content":{"rendered":"<p><\/p>\n<p>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.<\/p>\n<h2>Attributes of the hreflang link tag<\/h2>\n<link>    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.<\/p>\n<p>In the case of the hreflang attribute (link element attribute), the purpose is to specify languages.  All link elements belong to <head> section of the document.<\/p>\n<h2>Quirk In hreflang<\/h2>\n<p>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.<\/p>\n<p>The c<a href=\"https:\/\/developers.google.com\/search\/updates#clarifying-link-tag-attributes\" target=\"_blank\" rel=\"noopener\">hanglog<\/a> explain:<\/p>\n<p>&#8220;Clarification of link tag attributes<br \/>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.<\/p>\n<p>Why: While debugging a report from a site owner, we noticed that we don&#8217;t have this quirk documented.&#8221;<\/p>\n<h2>What has changed in the documentation?<\/h2>\n<p>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.<\/p>\n<p>This is the old version of the documentation:<\/p>\n<p>\u201cPut yours on <link> tags near the top of the <head> item  At least the <link> tags must be inside a well-formed placeholder <head> section, or before any element that may cause the <head> to close prematurely, as for example <\/p>\n<p> 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 <head> item.\u201d<\/p>\n<p>This is the recently updated version:<\/p>\n<p>&#8220;The <link> tags must be inside a well-formed placeholder <head> 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 <head> item  Also, don&#8217;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 <link> Tag.&#8221;<\/p>\n<p>Google&#8217;s documentation didn&#8217;t say what the consequence of the quirk is, but if Google was debugging it, that means it caused some sort of problem.  It&#8217;s something seemingly minor that could have an outsized impact.<\/p>\n<h3>Read the recently updated documentation here:<\/h3>\n<p><a href=\"https:\/\/developers.google.com\/search\/docs\/specialty\/international\/localized-versions\" target=\"_blank\" rel=\"noopener\">Tell Google about localized versions of your page<\/a><\/p>\n<p>Featured image by Shutterstock\/Mix and Match Studio<\/p>\n<p>[ad_2]<br \/>\n<br \/><a href=\"https:\/\/www.searchenginejournal.com\/hreflang-quirk\/519410\/\" target=\"_blank\" rel=\"noopener\">Source link <\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>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&#8230; <\/p>\n","protected":false},"author":1,"featured_media":26179,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-26178","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-seo-news"],"_links":{"self":[{"href":"https:\/\/afreeurl.com\/index.php?rest_route=\/wp\/v2\/posts\/26178","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/afreeurl.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/afreeurl.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/afreeurl.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/afreeurl.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=26178"}],"version-history":[{"count":1,"href":"https:\/\/afreeurl.com\/index.php?rest_route=\/wp\/v2\/posts\/26178\/revisions"}],"predecessor-version":[{"id":26180,"href":"https:\/\/afreeurl.com\/index.php?rest_route=\/wp\/v2\/posts\/26178\/revisions\/26180"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/afreeurl.com\/index.php?rest_route=\/wp\/v2\/media\/26179"}],"wp:attachment":[{"href":"https:\/\/afreeurl.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=26178"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/afreeurl.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=26178"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/afreeurl.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=26178"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}