If you’re an enterprise site with a global presence, it’s a good bet that you have hreflang tags implemented.
After all, hreflang is essential to global SEO.
There are three ways to tell Google about different versions of your page based on language or region:
- HTML
- HTTP Headers
- Sitemaps
It’s best practice to have a unique hreflang and only implement one of the above methods so as not to confuse Google (more on this below).
The method we’ll focus on for this post is the sitemap.
If you haven’t added a sitemap with hreflang, we have a blog post that teaches you how to create an XML sitemap with hreflang tags.
Because hreflang can only inform Google of differences in language and region if the sitemap is error-free, it’s important to audit your hreflang sitemap.
The Benefits of an Hreflang Sitemap
There are two key benefits to including your hreflang in your sitemap (as opposed to the other methods mentioned above):
- Page weight
- Access
Page Weight
When Google gets relevant information from the sitemap, it doesn’t have to get that same information from the page itself.
This works to reduce the page weight. The more page weight, the longer it takes Google to crawl.
So, a sitemap works to reduce page weight and makes crawling and rendering easier for Google.
Direct Access
Since you have direct access to the sitemap (and the ability to make changes to it) there’s no need to change each page individually should the need arise.
It's also easier to then submit the Hreflang sitemap to Google instead of waiting for the search engine to crawl your site.
Recommended Reading: How to Create a Sitemap and Submit to Google
Importance of rel=“alternate” Hreflang
Before we jump into auditing, let’s cover some considerations for hreflang.
If your site has alternate versions of a page based on the language or regions, its best practice to tell Google about the localized versions.
The rel=”alternate” hreflang allows search engines to more accurately crawl and index pages.
This allows search engines to discover new URLs - bots would crawl the alternates (which means the page is being crawled and can be indexed).
Not to mention, there are benefits for users, too: Searchers get a more targeted URL in the search results.
Hreflang and Referencing
Google actually requires including the alternates, because they show the association between the page versions.
Recommended Reading: Does Your Site Need Self-Referencing Hreflang Tags? Hint: It Does!
Google’s Maile Ohye, a Developer Program Tech Lead, says that …
When you implement rel= “alternate” hreflang, all alternates of the URL, including the URL itself, should be declared.”
You can watch the full video here:
Google offers this example of an hreflang 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>http://www.example.com/english/page.html</loc>
<xhtml:link
rel="alternate"
hreflang="de"
href="http://www.example.com/deutsch/page.html"/>
<xhtml:link
rel="alternate"
hreflang="de-ch"
href="http://www.example.com/schweiz-deutsch/page.html"/>
<xhtml:link
rel="alternate"
hreflang="en"
href="http://www.example.com/english/page.html"/>
</url>
<url>
<loc>http://www.example.com/deutsch/page.html</loc>
<xhtml:link
rel="alternate"
hreflang="de"
href="http://www.example.com/deutsch/page.html"/>
<xhtml:link
rel="alternate"
hreflang="de-ch"
href="http://www.example.com/schweiz-deutsch/page.html"/>
<xhtml:link
rel="alternate"
hreflang="en"
href="http://www.example.com/english/page.html"/>
</url>
<url>
<loc>http://www.example.com/schweiz-deutsch/page.html</loc>
<xhtml:link
rel="alternate"
hreflang="de"
href="http://www.example.com/deutsch/page.html"/>
<xhtml:link
rel="alternate"
hreflang="de-ch"
href="http://www.example.com/schweiz-deutsch/page.html"/>
<xhtml:link
rel="alternate"
hreflang="en"
href="http://www.example.com/english/page.html"/>
</url>
</urlset>
Conflicting Hreflang
We noted earlier that you should only implement hreflang using one method so as not to confuse Google.
But, what happens if you do add hreflang with more than one implementation?
In the case of this conflicting hreflang (for example: there’s hreflang included in both the sitemap and the HTML) Google’s John Mueller says the signals will be combined.
… if you have some hreflang in the HTML, and some in the sitemap, then we would try to combine that and add that together.”
There is, Mueller says, a situation in Google would have to guess which signal to follow.
… if you have one country language version on the page and you use the same country language version for a different page in the sitemap file.”
Auditing Localized Versions of Your Page
In order to serve its purpose, the hreflang needs to be error-free and send a clear message to Google.
As with any part of SEO, there are things that can go wrong with hreflang and sitemaps. This is where an hreflang audit comes in.
The crawl and audit should pick up on the following issues, each of which is included in our list of common hreflang mistakes to avoid.
1. Invalid order of hreflang values
Google expects the language code to precede a country code. If the values in a Hreflang attribute are in reverse order, it is not valid.
2. Invalid region in the hreflang tribute
Search Engines expect the region code in the Hreflang attribute to be in ISO 3166-1 Alpha 2 format. If you use the wrong region code, it will not get picked up by Google.
3. No self-referencing hreflang tag
If a page does not contain a self-referencing Hreflang in its set of Hreflang attributes those attributes may be ignored or interpreted incorrectly.
4. Conflicting hreflang and rel=canonical
Hreflang tags should be used in conjunction with the canonical tag. The canonical tag and the Hreflang tag for each version of a page should both point to the same URL.
If the canonical URL and Hreflang URLs conflict, the search engine may index the incorrect page.
5. Hreflang present outside <head>
Hreflang should be implemented in the <head>. If the Hreflang resides outside the <head>, it may not be crawled by search engines.
6. Hreflang with multiple defaults
You should never have more than one x-default entry on a page since that sends a confusing message to search engines.
7. Hreflang URL is invalid
Ensure that the hreflang itself is valid for it to function properly.
8. Empty hreflang URL
Empty hreflang URLs are going to be shown as errors in Google Search Console.
9. Use of relative URLs (instead of absolute)
Alternate URLs must be fully qualified, including the transport method (http/https). Relative URLs can be misinterpreted by Googlebot, so they might not be indexed.
10. Invalid language in the hreflang attribute
Search engines expect the region code in the Hreflang attribute to be in ISO 639-1 format. If you use the wrong language code, it will not get picked up by Google.
11. Hreflang with duplicate language/region combinations
There should never be multiple entries for a single language/region combo. If more than one URL is specified for the same language and country, Googlebot will ignore all of them because there is no clear message about which page should be indexed for this language version.
Hreflang Audits at Scale
Site audits within the seoClarity platform allows you to run an hreflang audit, which is able to pick up all of the hreflang errors (and then some).
(Hreflang issues found, sorted by count.)
Sort the issues detected by level of importance to prioritize your fixes, and, depending on the seriousness of the issue, create a task directly in the platform so the issue can be resolved.
(Click into an issue to see specifics and create a task.)
A trended view over time will confirm that the issues are decreasing as the applicable solutions are implemented.
Conclusion
Hreflang in the sitemap is a great way to send clear messages to Google while minimizing the page weight, just be sure to audit the localized versions of your pages to identify and resolve any technical issues.
Comments
Currently, there are no comments. Be the first to post one!