top of page
Writer's pictureBrent D. Payne

Has hreflang annotations using multiple methods

The web address in discussion has hreflang annotations defined utilizing more than a single technique (HTML, HTTP Header or XML Sitemap).


Why is this important?

There are three various techniques to implement hreflang annotations - HTML, HTTP Header, or XML Sitemap. Consensus within the industry suggests that one should assign hreflang via only one approach for any given URL. The reasoning is that overlapping methods increase the chances for mistakes to occur.


For instance, you apply hreflang on a webpage by inserting tags in the HTML <head> element as well as through the HTTP header. Later, your website transitions to a brand new domain. While updating the hreflang in the HTML <head>, you might overlook to modify the hreflang in the HTTP header.


Such discrepancies might prompt search engines to disregard the hreflang directive. Although issue-free currently, applying multi-method strategies could pose future risks.


What does the Optimization check?

The Optimization will be activated for any URL that possesses outbound hreflang determinations conducted via more than one of the listed techniques.


Examples that trigger this Optimization:


This Optimization would be activated if the URL had hreflang declarations set by at least two of the following techniques:

1. Hreflang within the HTML <head>:

<link rel="alternate" href="https://example.com/fr/page-example/" hreflang="fr-fr" /><link rel="alternate" href="https://example.com/es/page-example/" hreflang="es-es" /><link rel="alternate" href="https://example.com/de/page-example/" hreflang="de-de" />


2. Hreflang in the HTTP Header:

HTTP/... 200 OK...Link: <https://example.com/fr/page-example/>; rel="alternate"; hreflang="fr-fr",      <https://example.com/es/page-example/>; rel="alternate"; hreflang="es-es",      <https://example.com/de/page-example/>; rel="alternate"; hreflang="de-de"


3. Hreflang represented in an XML Sitemap:

<?xml version="1.0" encoding="UTF-8"?><urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"  xmlns:xhtml="http://www.w3.org/1999/xhtml">  <url>   <loc>https://example.com/en/page-example/</loc>   <xhtml:link               rel="alternate"              hreflang="fr-fr"              href="https://example.com/fr/page-example/">   <xhtml:link               rel="alternate"              hreflang="es-es"              href="https://example.com/es/page-example/">   <xhtml:link               rel="alternate"              hreflang="de-de"              href="https://example.com/de/page-example/">  </url>  ...</urlset>


Why is this Optimization marked 'Potential Issue'?

This hint is indicative of a prospective pitfall, one not ostensibly troubling the site at present, yet it warrants investigation for future consequences.


To mitigate impending complications, ascertain the most practical method for hreflang and eliminate alternate methods.


Further Reading

8 views

Comentários


bottom of page