All 17 hreflang hints checked by the Audisto Crawler
Table Of Content
- Self link missing
- Invalid language
- Document has no language
- Document has invalid language
- Hreflang and document language differ
- Hreflang < document language
- Hreflang > document language
- URL has no incoming hreflang links
- Languages are not unique
- Document linked twice or more
- Unbalanced: Not all documents are linked evenly
- HTTP status not 200 - OK
- Redirect only allowed for x-default
- URL not crawled
- Partially Unknown: Not all URLs are crawled
- Malformed links discarded
- Links outside <head> discarded
Hints
Self link missing
Description
This hint is set on all HTML pages that implement hreflang but miss a self link. The hint is also set on the hreflang group if one or more pages with a missing self link are detected.
Importance
Within an hreflang group every page within the set needs to reference all pages within the set including itself.
Missing self links often originate from the following:
- The Hreflang references on URLs with parameters are implemented without keeping the parameters
- The Hreflang references point to a different host or protocol
- The URL handling is fault-tolerant (e.g. regarding slashes or upper and lower case) and multiple URL variations are internally linked
Operating Instruction
Make sure to add proper self links to all pages or XML sitemaps implementing hreflang.
Invalid language
Description
This hint is set on all HTML pages with invalid hreflang language definitions. The hint is also set on the hreflang group if one or more pages with an invalid hreflang language definition are detected.
Example
Empty language
<link rel="alternate" hreflang="" href="http://example.com/page.html">
Non existing language
<link rel="alternate" hreflang="foo" href="http://example.com/page.html">
Invalid syntax with underscore instead of hyphen
<link rel="alternate" hreflang="en_US" href="http://example.com/page.html">
Incorrect order of language and region
<link rel="alternate" hreflang="US-en" href="http://example.com/page.html">
Importance
All hreflang references need to have proper language definitions using the ISO 639-1 standard for language codes and the ISO 3166-1 standard for country codes. If your site only targets different languages, you only need ISO 639-1. If you need distinction between region and language, then you also need ISO 3166-1.
Within the hreflang attribute the language code comes first. The optional region code is appended using a hyphen character:
<link rel="alternate" hreflang="en-US" href="http://example.com/page.html">
Note: Even though it is common to write the country letters in capitals, the definition does not have to be case-sensitive.
Operating Instruction
Make sure to have proper hreflang language definitions for all pages or XML sitemaps implementing hreflang.
Document has no language
Description
This hint is set on all HTML pages with missing document language definitions. The hint is also set on the hreflang group if one or more pages with a missing document language definition are detected.
Example
Empty lang attribute
<html lang="">
Missing lang attribute
<html>
Importance
Correct language settings can be crucial for localized content, since it allows search engines to display the best results for the matching audience. In addition, translators and screen readers often require a document language setting to function properly.
Operating Instruction
We suggest you use the lang and - in case of XHTML - the xml:lang attributes on the <html> element to specify the language of your document. For more details, see W3C's advisory on language settings.
Document has invalid language
Description
This hint is set on all HTML pages with invalid document language definitions. The hint is also set on the hreflang group if one or more pages with an invalid document language definition are detected.
Example
Non existing language
<html lang="foo">
Invalid syntax with underscore instead of hyphen
<html lang="en_US">
Incorrect order of language and region
<html lang="US-en">
Importance
Correct language settings can be crucial for localized content, since it allows search engines to display the best results for the matching audience. In addition, translators and screen readers often require a document language setting to function properly.
Operating Instruction
We suggest you use the lang and - in case of XHTML - the xml:lang attributes on the <html> element to specify the language of your document. For more details, see W3C's advisory on language settings.
Hreflang and document language differ
Description
This hint is set on all HTML pages where the language definition differs between the document and hreflang. The hint is also set on the hreflang group if one or more pages with a differing language definition are detected.
Importance
The language definition should be identical between hreflang and the document language set as lang attribute on the HTML document.
Note: It can be ok, that the document only uses a language definition and the hreflang definition uses a region in addition.
Operating Instruction
Make sure to use the same language definition for both, the HTML document and hreflang.
Hreflang < document language
Description
This hint is set on all HTML pages where the language definition differs between the document and hreflang and the hreflang language definition is more specific. The hint is also set on the hreflang group if one or more pages within the group triggers this hint.
Importance
It can be ok, that the document only uses a language definition and the hreflang definition uses a region in addition. However, translators and screen readers might be able to profit from a more specific language setting.
Operating Instruction
Suggest using the same language definition for the document language and hreflang.
Hreflang > document language
Description
This hint is set on all HTML pages where the language definition differs between the document and hreflang and the document language definition is more specific. The hint is also set on the hreflang group if one or more pages within the group triggers this hint.
Importance
Because the language definition of the HTML tag is more specific, the hreflang attribute obviously misses the region.
Ideally the language definition should be identical between hreflang and the document language set as lang attribute on the HTML document.
Operating Instruction
Make sure to use the same language definition for both, the HTML document and hreflang.
URL has no incoming hreflang links
Description
This hint is set on all URLs that have no incoming links, but are part of an hreflang group. The hint is also set on the hreflang group if one or more pages within the group triggers this hint.
Importance
Within an hreflang group every member needs to
- link to itself
- link to every other member of the group
URLs without incoming links break the hreflang group.
URLs without incoming links often originate from the following:
- URLs with parameters where the hreflang links miss the parameters in the corresponding URLs
- URLs available under a different protocol or host
- URLs accessible due to fault-tolerant URL handling (e.g. slashes, upper and lowercase in descriptive URLs or missing parameter validation)
Operating Instruction
Make sure all hreflang groups are balanced. Correct your internal URL handling e.g. by changing the links or implementing redirects.
Languages are not unique
Description
This hint is set on all hreflang groups where multiple documents exist that are referenced with the same language.
Importance
Within an hreflang group every language should be unique. This means that only a single document exists that has a specific language set on all incoming hreflang links and this language also matches the document language.
Multiple documents with the same language often originate from the following:
- URLs with parameters where the hreflang links miss the parameters in the corresponding URLs
- URLs available under a different protocol or host
- URLs accessible due to fault-tolerant URL handling (e.g. slashes, upper and lowercase in descriptive URLs or missing parameter validation)
- Hreflang attributes that only contain a language, but miss the region
Operating Instruction
Make sure that there is only one URL for each language/region combination in an hreflang groups.
Document linked twice or more
Description
This hint is set on all URLs that have multiple incoming links with different languages. The hint is also set on the hreflang group if one or more pages within the group triggers this hint.
Importance
Multiple incoming links with different languages indicate that multiple languages are available form that resource. While it is possible to have a text block for each language on a page or change the content e.g. based on a language accept header, this is uncommon and also not properly supported by all search engines.
Operating Instruction
Consider having separate URLs for each language.
Unbalanced: Not all documents are linked evenly
Description
This hint is set on the hreflang groups when not all documents are linked evenly. There is at least one URL in the hreflang group where the number of incoming and outgoing links differs.
Importance
Within an hreflang group every member needs to
- link to itself
- link to every other member of the group
Discrepancies between incoming and outgoing links often originate from the following:
- URLs with parameters where the hreflang links miss the parameters in the corresponding URLs
- URLs available under a different protocol or host
- URLs accessible due to fault-tolerant URL handling (e.g. slashes, upper and lowercase in descriptive URLs or missing parameter validation)
Operating Instruction
Make sure all hreflang groups are balanced. Correct your internal URL handling e.g. by changing the links or implementing redirects.
HTTP status not 200 - OK
Description
This hint is set on all URLs referenced by hreflang where the HTTP status code is not 200 - OK. The hint is also set on the hreflang group if one or more pages within the group triggers this hint.
Importance
Within an hreflang group every member needs to
- link to itself
- link to every other member of the group
URLs with a status code other than "200 - OK" can't do either of those and therefore break the hreflang group.
Operating Instruction
Make sure all members of an hreflang group send an HTTP status code 200 and properly implement the self link and links to all other group members.
Redirect only allowed for x-default
Description
This hint is set on all URLs where the HTTP status code is a redirect and the language is not set to x-default. The hint is also set on the hreflang group if one or more pages within the group triggers this hint.
Importance
Within an hreflang group every member needs to
- link to itself
- link to every other member of the group
- have content in the language specified by the hreflang link
While a redirect could refer to a page that matches all the above, it can't hold the content itself.
It is unclear if search engines are willing to follow the redirect for normal group members.
This is different regarding the x-default. The x-default specifies a fallback URL for unspecified languages. X-Default URLs are often implemented as redirects that look at the language accept headers and geolocation of the user to choose the best available language.
Operating Instruction
Make sure to correct all hreflang links to languages other than "x-default" to point to a URL with a 200 status code and proper content in the corresponding language.
URL not crawled
Description
This hint is set on all uncrawled URLs and hreflang groups with uncrawled members.
A URL can be uncrawled for various reasons like:
- The URL is blocked in the robots.txt
- All links to the URL are nofollow
- The URL is an external URL that is not part of the crawl
- The URL is still unprocessed due to crawl limits
Importance
With uncrawled URLs within an hreflang group it is impossible to determine if an hreflang group is free of errors. All hreflang groups with uncrawled URLs are marked with the status "Uncertain" unless we already found severe error in the crawled URLs of the group. For a full hreflang analysis all URLs of a group must be crawled.
Operating Instruction
Make sure the bot can crawl all URLs within the hreflang group e.g. by allowing the URLs to be crawled, adding additional domains to the project or by increasing the crawl resources.
Partially Unknown: Not all URLs are crawled
Description
This hint is set on the hreflang groups when not all documents of the hreflang group are crawled.
A URL can be uncrawled for various reasons like:
- The URL is blocked in the robots.txt
- All links to the URL are nofollow
- The URL is an external URL that is not part of the crawl
- The URL is still unprocessed due to crawl limits
Importance
With uncrawled URLs within an hreflang group it is impossible to determine if an hreflang group is free of errors. All hreflang groups with uncrawled URLs are marked with the status "Uncertain" unless we already found severe error in the crawled URLs of the group. For a full hreflang analysis all URLs of a group must be crawled.e
Operating Instruction
Make sure the bot can crawl all URLs within the hreflang group e.g. by allowing the URLs to be crawled, adding additional domains to the project or by increasing the crawl resources.
Malformed links discarded
Description
This hint is set on all HTML pages where hreflang references where discarded due to empty or malformed links. The hint is also set on the hreflang group if one or more pages within the group triggers this hint.
Example
Empty href
<link href="" hreflang="de" rel="alternate">
Malformed href
<link href="htp://example.com/" hreflang="en" rel="alternate">
Importance
Malformed or empty href in hreflang links cause hreflang definitions to be invalid. Search engines may discard hreflang related information completely. This may lead to inappropriate URLs showing up in the localized search results.
Operating Instruction
Make sure to correct all malformed hreflang links.
Links outside <head> discarded
Description
This hint is set on all HTML pages where hreflang references where found outside the <head> and therefore discarded. The hint is also set on the hreflang group if one or more pages within the group triggers this hint.
Example
Incorrect usage of hreflang within the HTML <body> element
<html>
<head>
...
</head>
<body>
<link rel="alternate" hreflang="en" href="http://example.com/page.html">
<link rel="alternate" hreflang="fr" href="http://fr.example.com/page.html">
Usage of hreflang after an element (e.g. iframe) that implicitly causes the head to be close and the body to open.
<html>
<head>
...
<iframe src="https://example.com/iframe.html"></iframe>
...
<link rel="alternate" hreflang="en" href="http://example.com/page.html">
<link rel="alternate" hreflang="fr" href="http://fr.example.com/page.html">
</head>
<body>
Importance
The hreflang attribute can be implemented in three ways:
- HTML head
- HTTP header
- XML sitemaps
Using hreflang links within the HTML <body> element is not allowed. Hreflang links within the body will be ignored.
Note: For invalid HTML it might look like the hreflang links are within the head, but the head can already be implicitly close by using a element that is only allowed within the body.
Operating Instruction
Make sure to move the hreflang links from the <body> element to the <head> element of the HTML document. Consider using an HTML validator to get a better understanding of the underlying problem.