---
title: "Hreflang and canonical checker"
description: "Check a page’s hreflang set: language codes, self reference, x-default, return links from every alternate and canonical tags that agree."
url: "https://rookflare.com/tools/hreflang-checker/"
---

# Hreflang and canonical checker

Check the hreflang set of one page: valid language codes, a self reference, x-default, a return link from every alternate and canonical tags that point to themselves. Use the form at https://rookflare.com/tools/hreflang-checker/ (needs JavaScript); the API endpoint is POST /api/public/v1/tools/hreflang with a JSON body { "url": "https://example.com" }.

## What you get

- Every hreflang code, named in plain English
- Return links from each alternate
- x-default and the self reference
- Canonical tags on every version

## x-default explained

x-default names the page for visitors whose language matches none of your alternates. It is optional, and Google recommends it. In this example the set lists en, de and fr, plus x-default for a language picker at /.

| Browser language | Page shown | Why |
| --- | --- | --- |
| German | /de/ | An exact match for de. |
| English (Australia) | /en/ | There is no en-AU version, so the language-only en version matches. |
| Spanish | / | Nothing matches, so search engines can show the x-default page. |

Every page in the set lists the same alternates, including x-default and itself.

## Codes that look right but are not

hreflang takes an ISO 639-1 language code, optionally followed by an ISO 3166-1 alpha-2 region. Some mistakes pass a format check, so read the codes yourself.

| Written | Use | Why |
| --- | --- | --- |
| en-UK | en-GB | The region code for the United Kingdom is GB. |
| uk | en-GB | uk is valid but means Ukrainian. |
| jp | ja | JP is the country; Japanese is ja. |
| cz | cs | CZ is the country; Czech is cs. |
| dk | da | DK is the country; Danish is da. |
| se | sv | se is Northern Sami; Swedish is sv. |
| GB | en-GB | A region needs a language in front of it. |

## What this tool checks

### The hreflang set

Every <link rel="alternate" hreflang> in the page, the language code format, duplicates, the self reference and x-default.

### Return links

We open up to 20 alternates and check that each one links back to the page you entered.

### Canonical consistency

The page and every alternate should name themselves as canonical. A canonical that points to another language cancels the hreflang.

## How to fix common problems

### Missing return link

Google ignores a pair unless both pages link to each other. Generate the full set in one template so every language lists all the others.

### Canonical points to the main language

Each language version should be its own canonical. Point the canonical of /de/ to /de/, not to /en/.

### Invalid code

Use ISO 639-1 language codes with an optional ISO 3166-1 region: en, en-GB, pt-BR. “uk” is Ukrainian, not the United Kingdom.

## Monitor this automatically

Each scheduled scan reads the canonical tag of every monitored page and compares its screenshot with the approved one, so a template change that breaks a language version shows up on the next scan. [Start free trial](https://app.rookflare.com/register/).

## Frequently asked questions

### Do I need x-default?

It is optional but recommended. It tells search engines which page to show when no language matches, usually a language picker or the main version.

### My hreflang is in the sitemap, not the HTML. Does the tool see it?

No. The tool reads the HTML of the page. Hreflang in an XML sitemap or HTTP headers is valid, but it is not checked here.

### Is this tool free?

Yes. You do not need an account. Each IP address can run 10 checks a minute and 100 a day, and a website can be checked 10 times in 10 minutes across all visitors so the tool is never used to flood a site.

### Do you store the URL or the results?

The result is kept for 10 minutes so a repeated check is instant, then it is deleted. We do not log the URLs you check or the content of the page.

## More free tools

- [Meta tag and Open Graph checker](https://rookflare.com/tools/meta-tag-checker/): Title, description, canonical and social card preview.
- [Robots.txt and sitemap validator](https://rookflare.com/tools/robots-txt-validator/): Crawler rules, AI bots, sitemap files and URL count.
