Learning how to test hreflang tags is essential for websites that serve visitors in different languages or countries. Although hreflang annotations may look correct in your website editor, the published pages can still contain technical errors.
For example, an international website might have English, French, and German versions of the same page. However, one version could contain an incorrect URL or a missing return tag.
As a result, Google may not use the intended language relationships correctly.
Therefore, testing hreflang tags is an important part of international SEO. This guide explains how to inspect annotations, check language codes, identify common mistakes, and validate your multilingual website.
What Are Hreflang Tags and Why Should You Test Them?
Hreflang annotations identify alternate versions of a webpage intended for different languages or regions.
For instance, an online business may publish separate service pages for English-speaking and German-speaking customers.
Although both pages describe similar services, they serve different language audiences.
Consequently, hreflang helps Google understand the relationship between those pages.
However, incorrect annotations can create confusion. Therefore, website owners should test hreflang whenever they launch translated content or change their website structure.
When Should You Perform a Hreflang Audit?
Regular testing is especially important after major website changes.
For example, review your annotations when:
- Publishing a new language version
- Changing page URLs
- Migrating to another domain
- Updating a multilingual plugin
- Modifying website templates
- Changing canonical settings
- Removing outdated translated pages
Additionally, periodic checks can help identify errors that appear during routine website maintenance.
How to Test Hreflang Tags Step by Step
A reliable hreflang audit involves checking more than the presence of HTML annotations.
Instead, you need to review URL mappings, language codes, reciprocal relationships, and indexing settings.
Follow the steps below to complete a practical technical SEO check.
Step 1: Identify All Alternate Page URLs
First, prepare a list of pages that represent equivalent content in different languages or regions.
For example, a multilingual website may have these contact pages:
- English:
https://example.com/en/contact/ - French:
https://example.com/fr/contact/ - German:
https://example.com/de/contact/
Although the URLs differ, they should serve the same general purpose.
Therefore, confirm that each page is a genuine language or regional alternative.
Avoid grouping unrelated pages simply because they belong to the same website.
Step 2: Inspect the Live HTML Source
Next, open one of your international pages in a browser.
Right-click and select View Page Source. Alternatively, use your browser’s source-viewing shortcut.
Then search for hreflang to locate the alternate annotations.
For an HTML-based implementation, the tags should appear inside the document’s <head> section.
A correct example might look like this:
<link rel="alternate" hreflang="en" href="https://example.com/en/contact/" />
<link rel="alternate" hreflang="fr" href="https://example.com/fr/contact/" />
<link rel="alternate" hreflang="de" href="https://example.com/de/contact/" />
In this example, the annotations identify English, French, and German versions of the same contact page.
However, finding these tags on one page does not prove that the entire implementation is correct.
Therefore, continue checking the corresponding alternate pages.
Step 3: Check Language and Region Codes
After locating the annotations, review their language and regional values.
Common examples include:
en— Englishfr— Frenchde— Germanen-US— English for the United Statesen-GB— English for the United Kingdomfr-CA— French for Canada
For example, en-GB is the appropriate value for UK English targeting.
By comparison, en-UK is not a valid hreflang language-region combination.
Additionally, a country code should not be used alone as the hreflang value.
Therefore, verify that every annotation uses a supported language code and an appropriate optional regional code.
Step 4: Verify Self-Referencing Hreflang Tags
Each page should include a reference to itself within its alternate group.
For example, the English contact page should include:
<link rel="alternate" hreflang="en" href="https://example.com/en/contact/" />
However, that annotation should appear alongside the other relevant language alternatives.
Similarly, the French and German pages should include their own self-referencing annotations.
As a result, the alternate group remains consistent across the website.
Step 5: Check Hreflang Return Tags
Return tags are reciprocal references between alternate pages.
For instance, if the English page references the French version, the French page should also reference the English version.
Therefore, inspect both pages rather than checking only one direction.
A simple verification process includes:
- Open the English page.
- Find its French alternate URL.
- Open the French page.
- Confirm that it references the English URL.
- Repeat the process for the remaining language versions.
Additionally, compare the complete alternate groups for consistency.
If reciprocal references are missing, Google may ignore the incomplete relationships.
For more information, read Hreflang Return Tag Errors and Fixes.
Step 6: Test HTTP Status Codes
Next, check whether every alternate URL loads successfully.
Ideally, the intended destination pages should return an HTTP 200 response.
However, outdated hreflang annotations sometimes point to redirected or missing pages.
For example, a German page might have moved to a new URL while its English alternative still references the old address.
Consequently, the alternate relationship may no longer match the live website structure.
Therefore, review:
- HTTP 200 responses
- Unexpected 301 or 302 redirects
- HTTP 404 errors
- HTTP 500 server errors
- Incorrect destination URLs
After identifying problems, update the hreflang annotations to reference the appropriate live URLs.
Step 7: Review Canonical Tags
Canonical tags and hreflang annotations serve different purposes.
While hreflang identifies language or regional alternatives, canonical tags indicate preferred URLs among duplicate or similar pages.
For example, an English page and its French translation may both be intended for independent indexing.
In that case, their canonical configurations should support that intention.
However, if every translated page canonicalizes to the English version, Google may not treat the other versions as independently indexable alternatives.
Therefore, review canonical settings alongside hreflang annotations.
For additional guidance, read Hreflang vs Canonical Tags.
Step 8: Check XML Sitemap Hreflang Annotations
Some websites implement hreflang through XML sitemaps rather than HTML.
If your website uses this method, open the relevant XML sitemap.
Next, inspect the alternate URL entries and their language codes.
Additionally, verify that:
- The XML syntax is valid.
- The XHTML namespace is declared correctly.
- Every alternate URL has its own sitemap entry.
- Each entry contains the complete corresponding alternate group.
- All destination URLs are correct.
However, you do not need to use both HTML and XML sitemap hreflang for the same relationships.
Instead, choose a reliable implementation method and maintain it consistently.
Step 9: Review Google Search Console
Finally, use Google Search Console to review important international pages.
Open the URL Inspection tool and check whether the relevant URLs are indexed or eligible for indexing.
Additionally, review the Google-selected canonical URL when that information is available.
However, Google Search Console does not provide a comprehensive dedicated hreflang validation report.
Therefore, URL Inspection should support your audit rather than replace direct hreflang testing.
Complete Hreflang Testing Checklist
Use this checklist whenever you review an international website.
- All alternate URLs are correct.
- Pages contain equivalent content.
- Language and regional codes are valid.
- Self-referencing annotations are present.
- Reciprocal return tags are correct.
- Destination URLs return expected HTTP responses.
- Canonical tags support the intended indexing strategy.
- Important pages are accessible to search engines.
- HTML or XML sitemap annotations are valid.
- Published annotations match the intended URL mappings.
- Changes have been verified on the live website.
Additionally, repeat these checks after important website updates.
Common Mistakes When Testing Hreflang Tags
Even when website owners perform basic checks, some problems may remain unnoticed.
Therefore, avoid the following testing mistakes.
Checking Only One Language Version
A correct English page does not guarantee that the French or German versions contain valid annotations.
For example, the English page may list every alternate URL correctly.
However, the German page might be missing its reciprocal references.
Therefore, review all relevant pages within the alternate group.
Relying Only on a Hreflang Generator
A generator can help prepare the required markup.
However, generating code does not confirm that it has been installed correctly.
For example, a WordPress theme might remove or modify the annotations during rendering.
Consequently, always inspect the published output.
You can use the Degates Free Hreflang Tag Generator to prepare new annotations for review.
Ignoring URL Migrations
Website migrations can change the location of translated pages.
For example, a Spanish page might move from /es/old-page/ to /es/new-page/.
However, its English alternative may still reference the outdated URL.
Therefore, update the relevant hreflang groups whenever URLs change.
Mixing Unrelated Pages
Hreflang should connect equivalent content.
For instance, an English pricing page should not reference an unrelated German blog post as its alternate.
Instead, connect pages that serve the same purpose in different languages or regions.
Expecting Immediate Google Search Changes
Correcting hreflang errors does not guarantee immediate changes in search results.
Google needs time to crawl and process updated pages.
Therefore, monitor search performance over time rather than expecting instant results.
How Often Should You Test Hreflang Tags?
The ideal testing schedule depends on how frequently your website changes.
For example, a small multilingual business website may need checks after major updates.
Meanwhile, a large international ecommerce website may benefit from automated monitoring because product URLs change more frequently.
At a minimum, test hreflang after:
- Launching new languages or regions
- Publishing important translated pages
- Changing URL structures
- Migrating domains
- Updating multilingual plugins
- Modifying canonical settings
Additionally, schedule periodic reviews to identify unexpected technical issues.
Helpful Tools for Hreflang Testing
Several tools and resources can support a technical hreflang audit.
Degates Free Hreflang Tag Generator
The Degates Hreflang Tag Generator helps prepare alternate language and regional annotations.
For example, you can use it when creating markup for new translated pages.
However, remember to verify the generated output after implementation.
Google Search Console
Google Search Console provides useful indexing and search performance information.
Additionally, URL Inspection can help identify canonical and indexing issues.
Nevertheless, direct hreflang validation is still necessary.
Google’s Official Documentation
Google provides guidance on supported hreflang formats and implementation requirements.
Therefore, consult its official localized versions documentation when reviewing technical requirements.
For additional troubleshooting, see the Degates Hreflang Tags Guide.
Frequently Asked Questions
How Can I Test Hreflang Tags Manually?
Open the live page source or XML sitemap and locate the hreflang annotations.
Next, review the alternate URLs, language codes, and reciprocal relationships.
Finally, confirm that the destination pages load correctly.
Does Google Search Console Show All Hreflang Errors?
No. Google Search Console does not offer a comprehensive dedicated hreflang error report.
Therefore, manual checks or specialized technical SEO tools are still useful.
How Often Should Hreflang Tags Be Tested?
Test after international content launches, URL migrations, multilingual plugin updates, or major website changes.
Additionally, periodic audits can help detect unexpected errors.
Can Incorrect Hreflang Tags Affect International SEO?
Yes. Invalid or incomplete annotations may prevent Google from using the intended language or regional relationships.
Therefore, accurate implementation and testing are important.
Should Every Page Have Hreflang Tags?
No. Hreflang is useful for pages with relevant language or regional alternatives.
However, a website serving only one language and one market generally does not need it.
Can I Test Hreflang Tags Without Paid Tools?
Yes. You can inspect page source code, review XML sitemaps, and check reciprocal URLs manually.
Additionally, Google Search Console provides useful indexing information.
Final Thoughts
Learning how to test hreflang tags helps website owners maintain accurate international SEO settings.
However, a successful audit involves more than finding annotations in the HTML source.
You also need to verify language codes, alternate URLs, reciprocal references, canonical settings, and HTTP responses.
Therefore, review your implementation regularly and test again whenever your website changes.
To prepare new annotations, try the Degates Free Hreflang Tag Generator.
For further guidance, explore the Degates Hreflang Tags Guide and Google’s official hreflang documentation.
Leave a Reply