Hreflang checker and tester for every language version.
This free hreflang checker reads the hreflang tags on any page, from the HTML and the HTTP headers, and validates every language and region code. It then opens up to 12 of the alternate pages they name to confirm each one loads, names itself as canonical and links back.
FreeNo accountAny store platform
Reads hreflang tags in the page and in its HTTP headers, then opens up to 12 of the versions they name to check each one links back.
The free RankX AI Shopify app works inside Shopify admin, where alt text, barcodes and search titles live. Fix one product or many at once, and undo any change with one click.
New listing copy proposed beside the current words and written to WooCommerce after you approve it. 7-day trial with 1,000 credits. No credit card.
On Shopify, the free RankX AI app fixes products inside Shopify admin: fix one product or many at once, and undo any change with one click. On WooCommerce: new listing copy proposed beside the current words and written to WooCommerce after you approve it.
Hreflang
What is hreflang, and what does an hreflang checker do?
Hreflang is an HTML attribute that tells search engines which language or region version of a page to show each searcher, so a French shopper lands on the French page. These hreflang annotations are the core of international SEO for a store that sells in several countries. An hreflang checker reads each annotation, validates every code and confirms each alternate page loads and links back, because Google ignores a tag it cannot read or that has no return link.
<link rel="alternate" hreflang="en-GB" href="https://juniper.example/en-gb/products/linen-shirt" />
<link rel="alternate" hreflang="fr-FR" href="https://juniper.example/fr-fr/products/linen-shirt" />
<link rel="alternate" hreflang="de-DE" href="https://juniper.example/de-de/products/linen-shirt" />
<link rel="alternate" hreflang="x-default" href="https://juniper.example/products/linen-shirt" />HTML link tags
In the page head
The usual method on Shopify and WooCommerce: one link tag per version, including the page itself. The checker reads these.
HTTP header
In the response
A Link header carries the same annotations, mostly for files such as PDFs. The checker reads these too.
XML sitemap
In the sitemap file
Some platforms list each annotation only in the XML sitemap. The checker does not read sitemaps, so check those entries in the file itself.
What it checks
What it takes to validate an hreflang implementation
The checker validates the codes on the page, then opens up to 12 of the alternate pages they name. That second step is the one that matters: Google uses hreflang only when every version points to every other.
| Check | What it looks for |
|---|---|
| Language and region codes | A two-letter ISO 639-1 language, then an optional ISO 3166-1 country code or a script such as zh-Hant; it catches en-UK, en_GB and a country with no language |
| Self-reference | The page lists itself among its versions, as Google asks |
| x-default | A fallback version for searchers whose language matches none of the others |
| One URL per code | No language code points at two different addresses |
| Full URLs | Every alternate uses a fully qualified URL, not a relative one |
| Return links | Each alternate page links back to the page you checked |
| Versions load directly | Each alternate answers without a redirect and does not fail to load |
| Canonical agrees | Each alternate names itself as canonical, not another language version |
Hreflang codes
Valid hreflang codes and common hreflang errors
A valid hreflang code is a language, optionally followed by a hyphen and a region. These examples show valid codes beside the hreflang errors the checker catches.
| Code | Result | Why |
|---|---|---|
| en | Valid | English for every region |
| en-GB | Valid | English for the United Kingdom, whose ISO 3166-1 country code is GB |
| fr-CA | Valid | French for Canada |
| zh-Hant | Valid | Chinese in traditional script |
| x-default | Valid | The fallback for every other language |
| en-UK | Invalid | UK is not an ISO 3166-1 code, so Google ignores the tag |
| en_GB | Invalid | hreflang uses a hyphen, not an underscore |
| GB | Invalid | A country alone is not enough; the language comes first |
How to use it
How to check hreflang tags in three steps
Check one page that has language or country versions, fix what fails where your platform writes the tags, then check again. One page usually shows the pattern for the whole template.
Step 1
Enter a page URL
Use a product or the homepage of one market. The checker reads every hreflang tag it finds in the HTML and the HTTP header.
Step 2
Read each version
Each alternate gets a row: whether it loads, links back and names itself as canonical. Failures come first, with what to change.
Step 3
Fix and audit again
Change the market, translation app or plugin setting that writes the tags, then run the check on a page in each language.
On your platform
Where the hreflang tags in your HTML come from
On most stores the platform or a translation plugin writes the hreflang tags, so a fix belongs in its settings rather than in each page.
Shopify Markets
Written for you
Shopify adds hreflang for each market with its own domain or subfolder, plus an x-default for your main domain. Problems usually come from a theme edit or a translation app adding a second set.
WooCommerce
Your translation plugin
WordPress translation plugins write the tags. Check one page of each language after changing plugin settings or URL structure.
Next
Canonicals agree
Each language version should be its own canonical. Check one with the Canonical Checker, and the search titles of each version with the Title and Meta Description Checker.
Questions
About the Hreflang Checker
Does hreflang affect rankings?
Not directly. Hreflang does not lift a page in the rankings; it tells Google which version to show for a searcher’s language and country. The result is that the right version appears instead of another language’s page.
What does the Hreflang Checker test?
That every code is a valid ISO 639-1 language with an optional ISO 3166-1 country, that the page lists itself, that there is an x-default, that no code points at two addresses, that the addresses are absolute, and that every version it reads loads directly, names itself as canonical and links back to the page.
Why does it say en-UK is wrong?
UK is not an ISO 3166-1 country code, so Google ignores the tag. The code for the United Kingdom is GB, as in en-GB.
What are return links and why do they matter?
If page A lists page B as its French version, page B must list page A too. Google ignores hreflang between two pages that do not both point to each other, which makes missing return links a common reason hreflang does nothing.
Do I need x-default?
It is recommended. x-default names the page for searchers whose language matches none of your versions, usually your main store or a country selector.
Does it read hreflang in my sitemap?
No. It reads the tags in the page and in its HTTP headers, the two methods a page itself carries. Google treats sitemap hreflang the same way, so if your platform lists versions only in the sitemap, check them there.
Does Shopify add hreflang tags?
Yes. With Shopify Markets, each market that has its own domain or subfolder gets hreflang tags automatically, plus an x-default for the main domain. Problems usually come from a theme edit or a translation app adding a second set.
More free tools for online stores
Check the rest of your store
Start here
Fix it once. Keep it fixed.
These checks show you what is wrong today. RankX AI checks your store for you, fixes products with your approval, and shows whether ChatGPT and Google AI Mode recommend them.
- ShopifyAn app inside your Shopify admin
- WooCommerceThe RankX AI web app, connected to your WordPress site
- Other websitesThe RankX AI web app
7-day free trial. No credit card required. On Shopify, install the app and Shopify bills your plan.