Manual: hreflang Analysis
The feature "hreflang Analysis" of Visual SEO Studio, documented in detail.
hreflang Analysis
The feature hreflang Analysis automates most checks for common potential issues with hreflang tags that prevent search engine showing the right localized page to the right user.
You can bulk audit all hreflang tags in a site. "hreflang Analysis" inspects them in HTML, in the HTTP headers, and in the XML Sitemaps.
Summary
The Summary tab sheet give you an overall perspective of the reports available in hreflang Analysis.
hreflang Analysis summary page
You can quickly select it anytime, even when not it is not visible, by clicking on the Show Summary link.
Reports table columns
Description
The descriptive name of the report. The text is an active link that once clicked will select the tab sheet containing the related report.
Pages
The number of pages affected by the issue detected by the report, i.e. the number of pages listed in the report.
Tot Pages
The total number of pages taken into account when elaborating the reports. This number is the same for all the listed reports.
Percentage
The percentage of pages detected by the specific report, computed as the ratio between the previous two values.
Pie chart icon
A mini pie chart visually reporting two important information:
- The percentage shown in the previous column, related to the colored pie slice.
-
The alert level of the issue investigated by the report. It is reported by the color of the slice:
- Red: the issue investigated has to be considered an Error.
-
Yellow: the issue investigated has to be considered a Warning.
Please notice that a warning is not a "light error", but something that at this stage the program cannot determine if it is a potential error or something wanted. - Azure: the report is just Informational.
Items break-down table
This table gives you an overview of all pages - computed and discarded - in the evaluated crawl session.
Items break-down graph
The 3D pie chart displays visually the content of the table above it. Like all 3D graphs in Visual SEO Studio, the chart can be zoomed, rotated, copied and saved at pleasure.
Export buttons
Reports in hreflang Analysis can all be exported.
In the upper-right corner of each report tab sheet you can find easy to spot export buttons:
- Permits to open the listed pages in Tabular View as a subset of the whole crawl session (and from there can also export them to Excel/CSV).
-
Permits to export the content of the shown columns to an Excel document.
This option is available only when the view in the tab sheet is a table (and it is also available from the table context menu). -
Permits to export the content of the shown columns to a CSV file.
This option is available only when the view in the tab sheet is a table (and it is also available from the table context menu).
Context menu
Every report in hreflang Analysis provides a context menu you can trigger by right clicking with the mouse on a page row:
-
Copy URL
Copies in the clipboard memory the URL of the selected resource. -
Browse URL
Navigates with the default browser the URL of the selected resource.
With hreflang
Entry type: Information
This report lists all pages with hreflang tags.
The tag being present or absent is not necessarily an error, but a condition to be known.
Without hreflang
Entry type: Information
This report lists all pages without hreflang tags.
The tag being present or absent is not necessarily an error, but a condition to be known.
No self-reference
Entry type: Error
Each language version must list itself as well as all other language versions. The alternate/hreflang tag pointing to the page itself is called "self-reference tag".
This report lists all pages without self-reference hreflang tag.
The following example depicts the reported scenario:
Example of page lacking self-reference hreflang tag
The Italian page version has an alternate/hreflang tag pointing to the English version, but it is missing the one pointing to itself.
How can you fix the issue on the reported pages:
Add the self-reference alternate/hreflang tag to the pages listed by the report.
If you set hreflang annotations via a CMS or a plugin, refer to their documentation to know how to do it, or contact their producer's customer support.
Only one hreflang
Entry type: Error
The alternate/hreflang tag has sense only for pages with multiple - two or more - localized versions. The case of pages with only one hreflang tag listed by this report is certainly an error.
In cases of websites with two languages, most likely what happened is the developer forgot to add the self-referring tag, as in the example below:
Two language website with no self-referring hreflang tag
On the other end hand it could also be that there is only self-referring tag and no other hreflang tag on the page:
Self-reference tag with no other hreflang tags
This could happen for example when not all pages have an alternative version in another language, but the CMS adds by default the self-referring tag.
How can you fix the issue on the reported pages:
Add the missing alternate/hreflang tag(s) to the pages listed by the report. If the only tag is the self-reference tag and the page has no alternate language versions, remove the self-reference tag.
If you set hreflang annotations via a CMS or a plugin, refer to their documentation to know how to do it, or contact their producer's customer support.
More hreflang URLs per language
Entry type: Error
The case of more than one hreflang URLs for the same language is an inconsistency that would confuse the search engine, unable decide which of the two should be picked.
The image below summarizes the scenario:
Example of inconsistent use of the hreflang tag for the English version
In the example the Italian version of the page has two alternate/hreflang tags pointing to two distinct pages with the same value of the hreflang
attribute.
How can you fix the issue on the reported pages:
First, spend some time also investigating what is the relationship between the two pages pointed by the hreflang tags sharing the same language code. Are they equivalent? Is or should one be canonicalized to the other (then the canonical version should be chosen)?
Once you decides which of the two pages is the correct one, remove the alternate/hreflang tag pointing to the other.
If you set hreflang annotations via a CMS or a plugin, refer to their documentation to know how to do it, or contact their producer's customer support.
'noindex' with hreflang
Entry type: Error
This report detects the following scenario:
A page is marked as noindex
(via meta tag or equivalent HTTP header) and at the same time has hreflang
tags.
Example of noindex page with hreflang tags
The two directive are giving conflicting signals to the search engine:
The noindex
says the page should not be indexed by the search engines, the alternate/hreflang
says is should be indexed to be shown in SERP to users with a certain localization.
What the search engine will do is not predictable; in our experience Google takes the most restrictive directive and avoid indexing the page (but this is not a documented behavior and thus nothing guarantees it will work the same in the future).
The case is complementary to the "hreflang to 'noindex'" case.
How can you fix the issue on the reported pages:
Sort out which of the two directive is the wrong one.
- If the page is a good candidate for being shown in the SERP, then remove the "noindex" markup.
- If the page should stay marked as "noindex", then remove the alternate/hreflang tags it has. Investigate also whether the pages pointed by the hreflang tags should be indexable.
If you set hreflang annotations via a CMS or a plugin, refer to their documentation to know how to do it, or contact their producer's customer support.
Non-canonical with hreflang
Entry type: Error
This report detects the following scenario:
A page is "canonicalized" (it means it has a canonical link tag pointing to another URL); at the same time has hreflang
tags.
Example of non-canonical page with hreflang tags
The two directive are giving conflicting signals to the search engine:
The canonical
link tag (non self-referring) says the page should not be indexed by the search engines because the page pointed by the canonical link tag should, the alternate/hreflang
says is should be indexed to be shown in SERP to users with a certain localization.
What the search engine will do is not predictable.
The case is complementary to the "hreflang to non-canonical" case.
How can you fix the issue on the reported pages:
Sort out which of the two directive is the wrong one.
In our experience it's most likely the hreflang directive which is wrongly added to canonicalized pages, and should be removed and left only on the canonical version.
If you set hreflang annotations via a CMS or a plugin, refer to their documentation to know how to do it, or contact their producer's customer support.
Missing generic hreflang
Entry type: Warning
This report lists all pages with alternate/hreflang tags for specific languages, but missing generic language hreflang tags.
The following example depicts the reported scenario:
Example of page missing generic language code in hreflang tags
The Italian version of the page has two alternative versions, one indicated to be shown in SERP to users of American English language, the other to be shown in SERP to users of British English language.
The search engine is not given indication of which page to show in SERP to users of other English language variants.
How can you fix the issue on the reported pages:
Although not having a generic language code hreflang tag is not an error per-se, we recommend adding one to have control on which page will be shown in SERP to users of the same generic language when their browser setting does not exactly match any language/region combination specified in the other alternate/hreflang tags.
When you are using only one specific language/region code per language, we recommend to remove the region part and use only the generic language code.
Missing x-default hreflang
Entry type: Warning
One of the uses of the "x-default" value of the hreflang
attribute is to serve as a fallback value for all languages not covered by the other alternate/hreflang tags.
This report lists all pages missing the x-default hreflang tag.
The following example depicts the reported scenario:
Example of page missing the x-default hreflang tag
The Italian version of the page has a self-reference hreflang tag for Italian language users, and a hreflang tag for English language users.
The search engine is not given indication of which page to show in SERP to users of other languages, for example to Spanish language speakers.
How can you fix the issue on the reported pages:
Although the reserved value hreflang="x-default"
is optional, we recommended for each logical page implementing hreflang adding one pointing to the page version you wish to be shown in SERP when no languages match.
This way you will have a way to control the page version shown in SERP when no other language/region matches the user's browser setting.
Unknown language codes
Entry type: Error
This report lists all pages with incorrect language codes.
Examples of common mistakes are:
- "
jp
" does not exist ("ja
" is Japanese, "jp" means Japan) - "
cn
" does not mean "Chinese" (use for example "zh-hans
" or "zh-hant
") - "
br
" is not the code for Brazilian Portuguese ("pt-BR
")
How can you fix the issue on the reported pages:
Make sure that all language codes you use identify the language in ISO 639-1 format, and optionally the region in ISO 3166-1 Alpha 2 format.
Specifying the region alone is not valid, it would be seen as a language code.
For language script variations, the proper script is derived from the country. For example, when using "zh-TW
" for users in Taiwan, the language script is automatically derived (in this example: Traditional Chinese).
You can also specify the script itself explicitly using the ISO 15924 format, so that "zh-Hans
" (Traditional Chinese), and "zh-TW
" and "zh-Hans-TW
" (both mean Traditional Chinese for users in Taiwan) are all valid values.
Unknown country codes
Entry type: Error
This report lists all pages with incorrect country codes.
Examples of common mistakes are:
- "
en-UK
" should be "en-GB
" - "
en-EU
" (macro regions are not valid) - Various unofficial, “pseudo-ISO” codes
How can you fix the issue on the reported pages:
When you add to the language code the optional language region, make sure the region is compliant to the ISO 3166-1 Alpha 2 format. Macro region values are not valid.
Unusual language/country pairs
Entry type: Warning
alternate/hreflang
rules are relaxed regarding composing ISO codes of language-country pairs.
For example "en-FR
" is correct, but unusual and could be a mistake.
This report lists all pages with unusual language/country pairs.
Examples of common mistakes are:
- “
es-LA
” (Spanish spoken in Laos, not in "Latin America") - “
en-NA
” (English spoken in Namibia, not in "North America")
How can you fix the issue on the reported pages:
Use the bottom pane hreflang Viewer tool, it will tell you for each language/region code the English name in the "Language Name" column.
Make sure that all language codes you use identify the language in ISO 639-1 format, and optionally the region in ISO 3166-1 Alpha 2 format.
hreflang to out-of-session URL
Entry type: Warning
This report lists all pages with hreflang tags pointing to pages not in the crawl session.
In the example below the Italian page has an alternate/hreflang tag pointing to the English version of the page, but this one is not in the crawl session.
Example of page with hreflang tag pointing to an out-of-session resource
It means the spider did not explore the page pointed by the alternate/hreflang tag, for a variety of possible reasons. May be because the crawl process stopped before, may be they were external links, and so on. The program is not thus able to check if there are errors in its hreflang implementation.
hreflang to non-crawled URL
Entry type: Error
This report lists all pages with hreflang tags pointing to pages which the spider cannot crawl.
In the example below the Italian page has an alternate/hreflang tag pointing to the English version of the page, but this one cannot be visited by the spider.
Example of page with hreflang tag pointing to a URL the crawled cannot visit
It means the spider did not explore the page pointed by the alternate/hreflang tag, because something prevented it. In the example the English page is not crawlable because of a Disallow
directive in the robots.txt file blocking its access.
How can you fix the issue on the reported pages:
Use the bottom pane hreflang Viewer tool, and click on the "Test 2" column (it has tooltip "Is the HREF pointing to a visited page?") to sort it.
Locate the alternate/hreflang tag which fails the test, and copy the URL pointed by the tag (column "Absolute URL"). Open the Tabular View (or the Crawl View, or the Folder View), and select the bottom pane "Non-crawled items". Find the URL using the "Find value in grid..." option to locate the corresponding page. Read in the "Crawl Status" column the reason why it could not be crawled.
It could be that the reason was simply a network error during the crawl process. Or it could be that there is a block in the robots.txt file. Use the same panel to find the blocking directive in the robots.txt file.
Then decide how fix the issue. If it is for example caused by a blocking directive in the robots.txt file, decide if you want to remove the block, or you want to remove the hreflang tag.
If you set hreflang annotations via a CMS or a plugin, refer to their documentation to know how to do it, or contact their producer's customer support.
hreflang to non-HTML
Entry type: Warning
This report lists all pages with hreflang tags pointing to non-HTML resources.
The following example depicts the reported scenario:
Example of page with hreflang tag pointing to a PDF file
Having the alternate/hreflang tag pointing to a non-HTML resource is not an error per-se, but is extremely rare; it is usually the consequence of a human mistake.
How can you fix the issue on the reported pages:
Verify if the result is what you actually want, and in case correct the alternate/hreflang tag to point to the correct resource.
If you set hreflang annotations via a CMS or a plugin, refer to their documentation to know how to do it, or contact their producer's customer support.
hreflang to 'noindex'
Entry type: Error
This report lists all pages with hreflang tags pointing to pages marked as 'noindex'.
The following example depicts the reported scenario:
Example of page with hreflang tag pointing to a 'noindex' page
The two directive are giving conflicting signals to the search engine:
The noindex
says the destination page should not be indexed by the search engines, the alternate/hreflang
says is should be indexed to be shown in SERP to users with a certain localization.
What the search engine will do is not predictable; in our experience Google takes the most restrictive directive and avoid indexing the destination page (but this is not a documented behavior and thus nothing guarantees it will work the same in the future).
The case is complementary to the "'noindex' with hreflang" case.
How can you fix the issue on the reported pages:
Sort out which of the two directive is the wrong one.
- If the destination page is a good candidate for being shown in the SERP, then remove the "noindex" markup.
- If the destination page should stay marked as "noindex", then remove the alternate/hreflang tag from the other. Investigate also whether the page containing the hreflang tag should be indexable.
If you set hreflang annotations via a CMS or a plugin, refer to their documentation to know how to do it, or contact their producer's customer support.
hreflang to non-canonical
Entry type: Error
This report lists all pages with hreflang tags pointing to non-canonical pages.
The following example depicts the reported scenario:
Example of page with hreflang tag pointing to a non-canonical page
The two directive are giving conflicting signals to the search engine:
The canonical
link tag (non self-referring) says the destination page should not be indexed by the search engines because the page pointed by the canonical link tag should, the alternate/hreflang
says is should be indexed to be shown in SERP to users with a certain localization.
What the search engine will do is not predictable.
The case is complementary to the "Non-canonical with hreflang" case.
How can you fix the issue on the reported pages:
Sort out which of the two directive is the wrong one.
In our experience it's most likely the hreflang directive which is wrongly pointing to the canonicalized page, and should changed to point to the canonical version.
If you set hreflang annotations via a CMS or a plugin, refer to their documentation to know how to do it, or contact their producer's customer support.
hreflang to non-'200 OK'
Entry type: Error
This report lists all pages with hreflang tags pointing to non-'200 OK' resources.
The following example depicts the reported scenario:
Example of page with hreflang tag pointing to a non-existing page
The destination page of the alternate/hreflang tag should of course return a "200 OK" status code.
The only exception to the rule is when the attribute value is hreflang="x-default"
and the destination page status code is a non-cacheable redirect (e.g. HTTP status codes 302, 303 or 307), then the case would not be reported here.
How can you fix the issue on the reported pages:
Use the bottom pane hreflang Viewer tool, and click on the "Test 6" column (it has tooltip "Is the HREF pointing to a page with status code '200 OK'?") to sort it.
Locate the alternate/hreflang tag which fails the test, and copy the URL pointed by the tag (column "Absolute URL"). Open the Tabular View (or the Crawl View, or the Folder View), and select the right pane "Properties".
Check there what the resource HTTP Status Code is.
-
A HTTP 3xx status code, for example a HTTP 301 "Permanent redirect".
You likely should update the alternate/hreflang tag with the end URL of the redirection. -
A HTTP 4xx status code, for example a HTTP 404 "Not Found" is clearly an error.
Either the alternate/hreflang tag is wrong, and you should fix it, or destination page was deleted in error. -
A HTTP 5xx status code, for example a HTTP 500 "Server error".
The server error could be a temporary situation, but you definitively have to investigate it and have it fixed.
hreflang with no return tag
Entry type: Error
This report lists all pages with hreflang tags pointing to pages with no return tag.
Two versions of the same logical page in different languages should point to each other with the alternate/hreflang tag.
If they don't, the tags will be ignored. The rule was created to prevent an external site to arbitrarily name itself as an alternative version of one of your pages.
The following example depicts the reported scenario:
Example of page with hreflang tag with no return tag
In the example the Italian version of the page has an alternate/hreflang tag pointing to the English version, which does not return a tag pointing to the Italian version.
How can you fix the issue on the reported pages:
There are two possibilities:
- The destination page is the correct alternate English version of the Italian page, and you should add there the return tag.
- Or the destination page is NOT the correct alternate English version on the Italian page, and you should remove from the latter the hreflang tag.
x-default to cacheable redirect
Entry type: Error
One of the uses of the "x-default" value of the hreflang
attribute is for URLs redirecting users based on their location or language preference.
This solution is sometimes used for the root domain address of multilingual websites where all languages have a dedicated subfolder or subdomain.
In such cases it is important the redirection to be "non-cacheable", i.e. a temporary redirect like HTTP status codes 302, 303 or 307 (it is a valid rule even when no hreflang is set).
In case of cachable redirect, like for example HTTP status codes 301 or 308, the browser would remember the redirection requesting the next time directly the destination URL. A change of language preferences would fail to get the desired result.
This report lists all pages with hreflang 'x-default' value pointing to cacheable redirect.
How can you fix the issue on the reported pages:
There are two possibilities:
- The destination page is the intended destination, based on user's location or language preference, and you should change the redirection to use a non-cachable redirect.
- Or the destination page, meant as a fallback for all languages not covered by the other alternate/hreflang tags, was moved permanently and you should update the alternate/hreflang hreflang tag
href
attribute value.
Conflicting language directives
Entry type: Warning
While both Google and Yandex support hreflang tags, Bing doesn't and uses instead the 'content-language' meta tag or HTTP header. Other tools (software translators, screen readers for visually impaired people, and so on) look for the "lang" attribute in the HTML. So there are several language directives a webmaster has to ensure they match.
This report lists all pages with conflicting language directives.
Example of page with conflicting language directives
The alternate/hreflang attribute is a help to the search engine to decide which of a set of "coupled" pages to show in a localized SERP, but Google and other search engines do not use it to understand the language family. Language detection is what they use.
The report detects inconsistencies by taking into account for each page all the possible language directives and uses a state-of-the-art language detector to test the language of title, description, and main content.
Page language directives view in Visual SEO Studio
Auxiliary to the full list report, the tool Page language directives at the bottom shows for each single page the language directives detected.
Keep in mind that language detection is not always exact, especially when the available text is not much (e.g. a short title): similar languages can be confused in short texts, and usage of foreign words can also cause false positives.
Some romance language short sentences can occasionally be mistaken for Latin. We could have improved accuracy a little by removing the ability to recognize Latin, but since there are so many temporary "Lorem ipsum" text forgotten out there on the Web, we decided to leave it and permit our users to detect them.
How can you fix the issue on the reported pages:
Use the bottom pane Page language directive tool, to check which language directives are conflicting.
- If the conflicting languages are ISO codes, uniform their usage.
- If the conflicting languages are detected by the language recognition system, check the tested texts to ensure the detection is correct. If indeed some text is in a wrong language (we often see it happen with copied and pasted and forgotten meta descriptions), have their content translated.