What Does "Empty or missing hreflang" Mean?

The URLs do not have an hreflang tag or the hreflang tag is empty.

Hreflang is a way to tell search engines that there are multiple versions of a page in different languages. This will help search engines serve visitors the most appropriate version of each URL by language or region.

Here's an example of hreflang tags for https://example.com/en-us/products, which is an English page targeting visitors in the United States that also has an English version targeting United Kingdom, a French version, a German version, and a default version available:

<link rel="alternate" hreflang="en-us" href="https://example.com/en-us/products" />

<link rel="alternate" hreflang="en-gb" href="https://example.com/en-gb/products" />

<link rel="alternate" hreflang="fr" href="https://example.com/fr/products" />

<link rel="alternate" hreflang="de" href="https://example.com/de/products" />

<link rel="alternate" hreflang="x-default" href="https://example.com/products" />

Why It's Important

If there are no other language/region versions of each URL, nothing needs to be done. Hreflang is not required on these pages.

However, if there are other versions of this page that serve multiple languages/regions, hreflang is an important tool to ensure visitors are getting to the right place. With no hreflang tags, it's possible search engines will get confused and the wrong version of the page could be ranked in a particular region or language.

For example, visitors from the UK could be served links to the US version of the page on search engines, or visitors from France could be served links to the Switzerland version.

How To Fix

Identify the URLs of all other versions of this page, noting the language and region each one targets. Then create an hreflang tag for each of these versions on all versions of this page.

An hreflang tag should be in the following format:

<link rel="alternate" hreflang="en-us" href="https://example.com/en-us/products" />

In the href attribute, enter the URL of the appropriate page.

In the hreflang attribute, enter the correct language and/or country code. There are two parts to an hreflang value: language in ISO 639-1 format (required) and region in ISO 3166-1 Alpha 2 format (optional), separated by a hyphen. When no language or region matches the user's browser setting, "x-default" is a valid hreflang value as well (even though it does not fit the language-region format).

Therefore, an hreflang value is considered valid if one of the following conditions are met:

  • It contains only a language and is in the ISO 639-1 format.

  • It contains a language and a region, the language is in the ISO 639-1 format, the region is in the ISO 3166-1 Alpha 2 format, and the language and region are separated with a hyphen.

  • It contains the value "x-default".

After you have added hreflang tags for all other versions of this page on this URL, you're not done. You still need to implement the same tags on all other versions of this page. If the hreflang tags of two pages don't both point to each other, the tags will be ignored.

Hreflang can be complicated. We recommend carefully reading Google's guidelines on hreflang and testing thoroughly before implementing any changes.

Did this answer your question?