Hreflang Checker: How to Validate Hreflang Tags and Fix the Errors
Hreflang tells search engines which language or regional version of a page to show to whom. The idea is simple. The implementation is fragile: every page has to list every version, every version has to list it back, and one wrong code or one redirecting URL can make a whole set unreliable. A hreflang checker reads all of it at once.
What a Hreflang Checker Does
A single page's hreflang tags tell you very little. The errors that matter show up only when you compare pages with each other: page A lists page B, but does page B list page A? Does B answer 200? Is B its own canonical? That is why a hreflang validator for one URL is useful for spot checks, while a crawler is the hreflang checker for a whole site.
A full check reads the tags on every page, follows every target, and answers four questions for each set:
- Is every code valid?
- Does every page list itself and every other version?
- Does every target return the link?
- Is every target an indexable, self-canonical URL that answers 200?
How Hreflang Tags Work
Google's guide to localized versions of your pages describes three ways to declare hreflang. Pick one per set.
| Method | HTML pages | PDFs and files | Lives in |
|---|---|---|---|
| Link tags | ✓ | – | HTML head |
| HTTP Link header | ✓ | ✓ | Server response |
| XML Sitemap | ✓ | ✓ | Sitemap file |
1. Link tags in the HTML head
<link rel="alternate" hreflang="en-us" href="https://example.com/en-us/pricing/" />
<link rel="alternate" hreflang="en-gb" href="https://example.com/en-gb/pricing/" />
<link rel="alternate" hreflang="de" href="https://example.com/de/preise/" />
<link rel="alternate" hreflang="x-default" href="https://example.com/pricing/" />
The same four lines go on all four pages, including the x-default one.
2. The HTTP Link header
Useful for PDFs and other files that have no HTML head:
Link: <https://example.com/en/guide.pdf>; rel="alternate"; hreflang="en",
<https://example.com/de/guide.pdf>; rel="alternate"; hreflang="de"
3. The XML Sitemap
<url>
<loc>https://example.com/en-us/pricing/</loc>
<xhtml:link rel="alternate" hreflang="en-us" href="https://example.com/en-us/pricing/" />
<xhtml:link rel="alternate" hreflang="de" href="https://example.com/de/preise/" />
</url>
The sitemap needs the xhtml namespace declared on its urlset element, and each url entry repeats the full set. Sitemaps keep large sets out of the page head, but they are easy to forget when pages change.
The Rules Every Hreflang Set Must Follow
- Self-reference. Google says each version must list itself as well as all the other versions.
- Return links. If page A points to page B, B must point back to A. Google says that if two pages do not both point to each other, the tags can be ignored.
- Fully qualified URLs. https://example.com/de/, not /de/.
- Healthy targets. Each target should answer 200, be indexable and be its own canonical. A tag that points at a redirect, a 404 or a noindex page is a signal search engines have to work around.
- The equivalent page. The German pricing page should point to the French pricing page, not to the French home page.
Codes follow fixed standards. Google lists them in its localized versions guide:
| Code | Standard | Example | Valid |
|---|---|---|---|
| Language | ISO 639-1 | de, pt | ✓ |
| Language and region | ISO 3166-1 Alpha 2 | de-at, pt-br | ✓ |
| Language and script | ISO 15924 | zh-Hant | ✓ |
| Region alone | none | us | – |
| United Kingdom | GB, not UK | en-uk | – |
| Fallback | Reserved value | x-default | ✓ |
x-default: The Fallback Version
x-default is a reserved value for the page to show when no other language or region in the set matches the visitor. Google suggests it for language selector pages and for pages that redirect visitors based on their language or location.
<link rel="alternate" hreflang="x-default" href="https://example.com/" />
It is optional, but a good idea on the home page and any page with a language picker. Like any other target, the x-default URL should answer 200, be indexable and be its own canonical, and every page in the set should name the same x-default. A common slip is pointing x-default at a URL that redirects visitors by location, then letting that redirect end on an error.
The Most Common Hreflang Errors
| Error | Looks like | Fix |
|---|---|---|
| No return link | de omits en-us | One shared list per set |
| No self-reference | Page omits itself | Add its own URL |
| Wrong region code | en-uk | en-gb |
| Region without language | hreflang="us" | en-us |
| Relative URL | /de/ | Full https URL |
| Target redirects or errors | French URL 301s | Final URL |
| Target is canonicalized | Parameter URL | Canonical URL |
| One code, two URLs | Two pages labeled de | One URL per code |
| Tags outside the head | Script ends head early | Move up, or use header |
| Language mismatch | hreflang fr, html lang en | Match the page text |
SEO ProCheck's hreflang and international SEO implementation guide walks through each of these in more depth.
Hreflang and Canonicals
Hreflang and canonical tags work together, and they break each other easily. Each language version should be its own canonical. If the German page names the English page as canonical, you are telling search engines the German page is a duplicate, which works against its hreflang. A canonical points within a language; hreflang points across languages.
Also check that every URL in a hreflang set is the canonical version: same protocol, same host, same trailing slash. A set that mixes http and https URLs, or URLs with and without a slash, fails the return link check even when the pages are right, because the URLs do not match exactly.
How to Check Hreflang on a Whole Site
- Crawl every language version. If each language lives on its own domain or subdomain, include them all in the crawl, or the return links cannot be checked.
- Read hreflang from every method you use: the HTML head, the HTTP Link header and the sitemaps. A set declared two ways is a set that can disagree with itself.
- Validate the codes before anything else. One wrong code repeated by a template can affect thousands of pages.
- Check return links and self-references for every page.
- Check target health: status, indexability and canonical of each target.
- Look for missing sets: pages with equivalents in other languages but no hreflang at all.
- Fix at the template or plugin level, not page by page, then crawl again.
We do this on our own site. neova.app runs in 15 languages. In our SEO pass on November 20, 2026, its XML Sitemaps listed 1,358 URLs, and every hreflang link was returned: fully reciprocal. With 15 versions, each page lists 15 URLs, itself included, and each of those must list it back. Generate every tag in a set from one shared list, and the return links follow.
hreflang sets are step 12 of the technical SEO audit checklist. If your language versions redirect visitors, read the redirect chains guide too.
Check Hreflang With Neova
Neova's International category shows the language and region versions of each page and whether they point at each other. It reads hreflang from the HTML head and the HTTP Link header, adds Hreflang Languages and Hreflang Targets columns to every HTML page, and checks html lang against hreflang and against the page's own text. Some of the checks:
- Hreflang Return Link Is Missing and Hreflang Self-Reference Is Missing
- Hreflang Language Code Is Invalid and Hreflang Country Code Is Invalid
- Hreflang Points to a non-200 URL and Hreflang Points to a Canonicalized URL
- Hreflang Catch-All Target Is Broken, Noindex, Canonicalized or Inconsistent
- Hreflang Points to a Locale Root, Not the Equivalent URL
- Hreflang and HTML Lang Disagree on the Language
- Hreflang Is Missing Where Locale Equivalents Exist
Each flag says why it matters, how to fix it and its source, and every table exports to CSV or Excel for the developer who fixes the template. Neova runs all 694 checks on every plan, Free included:
| Neova | |
|---|---|
| Runs on | |
| Checks | 694 |
| Free plan | 1,000 URLs a crawl |
| Interface languages | 15 |
Mac means Apple silicon; the browser is Neova Online, with the same account. See Features, Pricing or download Neova.
Questions
What is a hreflang checker?
A tool that reads the hreflang tags of a site and checks them against each other: valid language and region codes, self-references, return links, x-default, and whether each target answers 200, is indexable and is its own canonical.
What are hreflang return links?
If page A lists page B as an alternate, page B must list page A too. Google says that when two pages do not both point to each other, their hreflang tags can be ignored.
Is x-default required?
No, it is optional. It is recommended for language selector pages, home pages and pages that redirect visitors by language or location, so search engines know which version to show when nothing else matches.
Should I use en-uk or en-gb?
en-gb. The region part is an ISO 3166-1 Alpha 2 country code, and the code for the United Kingdom is GB. en-uk is not a valid value. More answers like this sit in the hreflang and international SEO FAQ on SEO ProCheck.
Which hreflang method is best?
Any of the three works for Google: link tags in the HTML head, the HTTP Link header or the XML Sitemap. Use one method per set. Link tags are easiest to check, the header suits PDFs, and sitemaps keep large sets out of the page.