Hreflang Checker
Check the hreflang tags of any page or sitemap. Every language and region code is validated, each alternate page is fetched to confirm it links back, and you get the corrected tag set to copy. Find the invalid codes, missing return links and self-reference gaps that make Google ignore hreflang.
- Validates ISO language and region codes
- Checks return links on every alternate
- Reads HTML, HTTP headers and sitemaps
Related checks: Canonical URL Checker (hreflang URLs must be canonical), XML Sitemap Validator and Redirect Checker.
The hreflang rules Google actually enforces
Hreflang only works when every page in the group agrees with every other. These are the checks that matter.
Valid codes
A two-letter language (ISO 639-1), optionally a script and a region (ISO 3166-1), or x-default. en-UK, jp and en_US are all wrong.
Return links
If page A lists page B, page B must list page A. Without the return link, Google ignores the pair.
Self-reference
Each page must include an annotation for itself, using its own language code.
x-default
A fallback for visitors whose language isn't listed. Recommended once you have two or more languages.
Healthy alternates
Every alternate should return 200, be indexable and be canonical to itself. Otherwise hreflang is ignored.
Placement and format
Inside the head, with full https:// URLs. Relative URLs, fragments and duplicate codes are flagged.
Hreflang mistakes and the correct code
A handful of wrong codes cause most hreflang errors. The tool suggests the fix for each.
| Wrong value | Problem | Correct value |
|---|---|---|
| en-UK | UK is not an ISO 3166-1 country code. | en-GB |
| jp, cn, kr | Country codes used as languages (kr is Kanuri, not Korean). | ja, zh-CN, ko |
| en_US | An underscore instead of a hyphen. | en-US |
| eng, fra, deu | Three-letter codes. Google expects two-letter ISO 639-1. | en, fr, de |
| iw, in | Retired language codes. | he, id |
| es-419 | A UN region number, not a country. | es, or list es-MX, es-AR and so on |
| English | A language name rather than a code. | en |
How to test an hreflang setup
Check one page first, then the whole group.
Pick a source
Enter a page address, paste its HTML, or switch to XML sitemap if your hreflang lives there.
Check the alternates
Leave Check the alternate pages on, so each alternate is fetched and its return link verified.
Read the problems
Fix errors first: invalid codes, missing self-reference, missing return links, alternates that redirect or are noindex.
Copy the tag set
Use the generated block on every page in the group, then run the check on another language version.
How to implement hreflang well
Hreflang is easy to get slightly wrong and hard to notice. These habits keep it right.
Same set on every page
Every page in the group should carry the same block, so every pair links both ways.
Pick one method
HTML tags, HTTP headers or the XML sitemap. Mixing them risks contradictions.
Match the canonical
hreflang URLs must be the canonical version of each page, with consistent protocol and trailing slashes.
Content must differ
Use hreflang for translations or regional variants. Near-identical pages are better consolidated with a canonical.
It's a hint, not a command
Google may still show another version. Hreflang swaps the right URL in results, it doesn't raise rankings.
Re-check after changes
Adding a language means updating every existing page. Check the group after each release.
What hreflang is and why every page in the group has to agree
Hreflang is an annotation that tells search engines which language, and optionally which region, a page is meant for, and where its equivalents in other languages live. Its job is to help the right version appear for the right searcher, so that a visitor in Kathmandu is shown the English or Nepali page that suits them. It does not raise rankings by itself, and Google decides the language of a page from the content, not from the annotation.
The rules are strict because the annotations work as a set. Google's guide to localized versions says each version must list itself and all the other versions, and that if two pages do not point to each other, the tags are ignored. Alternate URLs must be fully qualified with https://, and language codes must come from ISO 639-1 with optional ISO 3166-1 Alpha 2 region codes. The special value x-default covers visitors who match no listed language.
A single page can look right and still be wrong, because the proof is on the other pages. A checker reads the tags on one page, validates each code, then fetches every alternate to see whether it links back, returns 200 and points to itself as canonical. That is the check people usually skip when they test by eye. It also gives you a corrected set of tags to copy onto each page.
When to check hreflang
Check the whole group, not one page, and repeat the check after any language or URL change.
Launching a second language
A site adding Nepali alongside English needs tags on every existing page too. Check that both versions list each other and themselves.
Targeting regions with the same language
Pages for en-GB, en-AU and en-NP are easy to mislabel. Validate each code and confirm that every region links to the others.
When the wrong version ranks
If searchers in one country keep seeing another country's page, check for missing return links, invalid codes or an alternate that canonicalises elsewhere.
After a domain or URL change
Hreflang must use the new URLs, as Google's site move guidance says. Check that no annotation still names an old address that redirects.
Auditing sitemap-based hreflang
Large sites often put annotations in the XML sitemap. Check a sitemap or its pasted text for the same errors as HTML tags.
Reviewing a plugin or CMS setup
Translation plugins write the tags for you, and not always correctly. Check one page from each language to see what was output.
Hreflang mistakes and how to fix them
Hreflang fails quietly, so these are worth checking even when nothing looks wrong.
No return links
What goes wrong: Page A lists page B, but page B does not list page A. Google says that if two pages do not point to each other, the tags are ignored.
The fix: Put the same complete set of annotations on every page in the group, so every pair links in both directions.
Missing self-reference
What goes wrong: A page lists its alternates but not itself. Google says each version must list itself as well as the others, so the set is incomplete.
The fix: Add an annotation for the page's own URL, with its own language code, to the same block.
Invalid language or region codes
What goes wrong: en-UK, jp, en_US and English are not valid. The region must be an ISO 3166-1 Alpha 2 code and the language an ISO 639-1 code, joined by a hyphen.
The fix: Use en-GB, ja, en-US and en. A country code cannot stand alone, so write a language first, such as en-NP.
Alternates that redirect or point elsewhere
What goes wrong: If an alternate URL redirects, returns an error or declares a different canonical, the annotation names a page that is not the one Google will index.
The fix: List only final URLs that return 200 and are canonical to themselves. Keep protocol, host and trailing slash consistent.
Redirecting visitors by language or IP
What goes wrong: Automatically sending users to a version based on their language or location can stop users and crawlers from reaching every version. Google advises against it.
The fix: Show a visible language or region selector. Mark the selector page as x-default, and let each URL load in its own language.
Mixing methods that disagree
What goes wrong: HTML tags, HTTP headers and sitemap annotations are equivalent for Google. Using two of them with different data creates contradictions that are hard to trace.
The fix: Choose one method for the whole site. HTML suits small sites, headers suit PDFs and other files, and a sitemap suits large sites.
Hreflang terms explained
hreflang- An attribute that names the language, and optionally the region, of a linked alternate page. It appears in HTML link elements, HTTP headers or sitemap entries.
- Language code
- A two-letter ISO 639-1 code such as
en,frorne(Nepali). It is the required part of every hreflang value exceptx-default. - Region code
- An optional ISO 3166-1 Alpha 2 country code such as
GBorNP, written after the language and joined with a hyphen, as inen-GB. - Script code
- An optional ISO 15924 code for the writing system, such as
HansorHantinzh-Hans. It is used when the script matters more than the region. - Return link
- The reciprocal annotation on an alternate page that points back to the page that referenced it. Without it, Google ignores the pair.
- Self-referencing annotation
- An entry in the hreflang set that names the page itself, with its own language code. Every version must include one.
x-default- A reserved value for the page to show when no listed language or region matches the visitor. It suits a language selector or main version.
- Alternate URL
- A URL of another language or regional version of the same page. It must be fully qualified, including
https://, and does not have to be on the same domain.
Related tools, guides and services
Hreflang depends on canonicals, redirects and sitemaps agreeing. These check them.
Canonical URL Checker
Confirm each language page canonicalises to itself, not to another language.
ToolXML Sitemap Validator
Check the sitemap file if your hreflang annotations live there.
ToolRedirect Checker
Make sure no alternate URL in your set redirects or loops.
GuideRedesign SEO migration checklist
Read why hreflang annotations must be updated to new URLs during a move.
ServiceInternational SEO service
Get site structure, hreflang and localisation planned for several countries or languages.
ServiceTechnical SEO service
Have hreflang, canonicals and crawl signals audited together.
Built by
Madhav Kushwaha
SEO, AEO, GEO & Digital Marketing Consultant in Kathmandu, Nepal, and trainer at ODcrU Academy and TechAxis Institute. I built this checker because hreflang fails quietly. The tags look right, but one wrong code, one missing return link or one alternate that canonicalizes elsewhere, and Google ignores the whole set. The expensive errors are on the other pages, so this tool fetches them too.
Hreflang Checker: Frequently Asked Questions
More free SEO tools
International SEO depends on canonicals, sitemaps and clean redirects all agreeing. Check each one.