Free instant website audit · 190,000+ sites checked · no card, no account
Custom Web Audits
← All free tools
🌐

Hreflang & Canonical Checker

Check the canonical tag and hreflang annotations on any page. A correct canonical prevents duplicate-content issues, and valid hreflang tags make sure Google serves the right language and region version to each visitor.

⚡ Interactive demo — sample data
Self-referencing canonical is correct, but one hreflang region code is invalid and x-default is missing.
Self-referencing canonical: https://example.com/page Looks good
hreflang="en-us" → https://example.com/page (valid language-region code) Looks good
hreflang="es-mx" → https://example.com/es/pagina (valid language-region code) Looks good
hreflang="en-uk" → invalid region code — the UK's ISO code is GB, so use 'en-gb' Issue
x-default missing — add a fallback for visitors who match no listed language/region Warning
Verify reciprocity — each listed alternate page must point back to this one Warning

About this tool

Check the canonical tag and hreflang annotations on any page. A correct canonical prevents duplicate-content issues, and valid hreflang tags make sure Google serves the right language and region version to each visitor.

How it works

Enter your page URL
Paste any public page and run the check. We fetch the HTML and read the two tags that control which version of a page search engines index and serve: the canonical link and every hreflang annotation in the head.
Review canonical and hreflang
You see whether the page has a canonical tag and whether it points to itself (the healthy default) or somewhere else. For international pages, you get the full list of hreflang tags with their language/region codes, plus a check for the x-default fallback.
Fix the tags and re-run
Add a self-referencing canonical where one's missing, correct any malformed hreflang codes, and add x-default if you serve multiple languages. Re-run to confirm a clean setup before search engines re-crawl.

What we check

  • Canonical tag presence — Confirms the page has a rel="canonical" link in its head. The canonical tells search engines which URL is the master version when the same or similar content is reachable at multiple addresses — without one, you risk duplicate-content dilution.
  • Self-referencing canonical — Checks whether the canonical points back to the page's own URL. A self-referencing canonical is the correct default for a unique page; it confirms 'this is the original' and absorbs URL variations like tracking parameters into one indexed address.
  • Canonical pointing elsewhere — Flags when the canonical points to a different URL. That's intentional and correct on a duplicate (telling Google to credit the original instead), but a mistake when it accidentally de-indexes a page that should rank on its own — so we surface the target for you to confirm.
  • Hreflang annotations — Lists every rel="alternate" hreflang tag on the page. Each one maps a language (and optional region) to the URL serving that version, so Google can show a French visitor the French page and a UK visitor the UK page of the same content.
  • Language & region code validity — Hreflang values use an ISO 639-1 language code (en, es, de), optionally followed by an ISO 3166-1 Alpha-2 region code (en-us, es-mx, pt-br). The format is language first, then region — a common mistake is putting a country code alone (like 'uk' or 'en-uk' instead of 'en-gb').
  • x-default fallback — Checks for an hreflang="x-default" entry, which tells search engines which page to serve when none of your language/region versions matches the visitor — a language selector or your primary-market page. It's recommended whenever you run multiple hreflang versions.

Common issues we catch

  • Missing canonical tag — A page with no canonical leaves Google to guess the master version when the same content is reachable via tracking parameters, trailing slashes, or http/https variants. Add a self-referencing canonical to every indexable page so signals consolidate on one address.
  • Canonical accidentally pointing to the wrong page — A template that hardcodes the canonical to the homepage — or copies it from another page — quietly tells Google to ignore the current page and index something else instead. The page stops ranking on its own and no one notices because it 'works' in a browser.
  • Wrong order in hreflang codes — Hreflang is language-then-region: en-us, not us-en. Reversing them, or using a region where a language belongs, makes Google ignore the annotation. The language part is required; the region part is optional but must follow, not lead.
  • Invalid region codes — Common errors include 'en-uk' (the UK's ISO country code is GB, so it must be 'en-gb'), or using a made-up code like 'en-eu' (there's no EU country code). Region values must be valid ISO 3166-1 Alpha-2 country codes, not informal abbreviations.
  • Non-reciprocal hreflang tags — Hreflang must be bidirectional: if the English page lists the Spanish page, the Spanish page must list the English page back. If page B doesn't return the reference, Google may ignore the entire cluster. One-way annotations are a frequent, hard-to-spot failure.
  • Missing x-default — Without an x-default, a visitor whose language and region don't match any of your versions gets whatever Google guesses. Adding x-default pointing to a language selector or your main market gives that fallback an explicit, intended target.
  • Hreflang and canonical contradicting each other — Each language version must self-canonicalize. If the German page canonicalizes to the English page while also being listed as the German hreflang alternate, the two tags conflict — and Google typically trusts the canonical, dropping the German page from its index.

Where this matters

  • Google Search — Honors the canonical as a strong (not absolute) hint for choosing the indexed URL, and uses reciprocal, valid hreflang to serve the right language/region version. Google ignores hreflang clusters that aren't bidirectional or that fight the canonical.
  • Bing & Yandex — Both respect canonical tags. Bing has stated it largely ignores hreflang and relies on other localization signals, while Yandex uses its own region-targeting — so canonical is the universally honored tag and hreflang is primarily a Google play.
  • WordPress & multilingual plugins — SEO plugins add a self-referencing canonical automatically, and multilingual plugins generate hreflang clusters across translated pages. Misconfiguration usually comes from mixing two plugins or manual overrides — exactly the conflicts this checker surfaces.
  • Shopify & hosted platforms — Markets and locale features can emit hreflang and canonical tags for you, but template edits and duplicate apps can produce wrong codes or pages that canonicalize away their own ranking. Verify what's actually in the rendered head, not just the settings panel.
  • Single-language sites — Most sites need only a self-referencing canonical and no hreflang at all — hreflang is solely for serving the same content in multiple languages or regions. Adding hreflang to a single-language site adds risk with no benefit; this tool confirms the canonical is enough.

Frequently asked questions

What is a canonical tag?
A canonical tag (rel="canonical") tells search engines which URL is the master version of a page when the same or similar content is reachable at more than one address. It consolidates duplicate signals — from tracking parameters, slashes, or http/https — onto a single URL so your ranking strength isn't split.
What does a self-referencing canonical do?
It points a page's canonical at its own URL, confirming 'this is the original.' It's the correct default for any unique, indexable page: it absorbs minor URL variations into one address and prevents accidental duplicate-content issues. Most pages should self-canonicalize.
What is hreflang and when do I need it?
Hreflang tells search engines which language and region a page version targets, so a French speaker sees the French page and a UK visitor sees the UK page. You only need it if you publish the same content in multiple languages or for multiple regions — single-language sites should skip it entirely.
What format do hreflang codes use?
An ISO 639-1 language code first (en, es, de), optionally followed by an ISO 3166-1 Alpha-2 region code (en-us, es-mx, pt-br). The language is required and comes first; the region is optional and comes second. Don't reverse them and don't use informal codes.
Why is the UK code 'en-gb' and not 'en-uk'?
Hreflang regions use ISO 3166-1 country codes, and the official code for the United Kingdom is GB, not UK. So British English is 'en-gb'. Using 'en-uk' is invalid and Google ignores the annotation. Always check the value against the ISO country list when in doubt.
What is hreflang x-default?
The x-default value marks the page to serve when none of your language/region versions matches a visitor — typically a language-selection page or your primary-market version. It's the fallback for everyone you didn't explicitly target, and it's recommended on any site running multiple hreflang versions.
Do hreflang tags have to be reciprocal?
Yes. If page A's hreflang lists page B, then page B must list page A in return. Hreflang annotations must be bidirectional across the whole cluster, or search engines may disregard them. Non-reciprocal tags are one of the most common reasons hreflang silently does nothing.
Can canonical and hreflang conflict?
Yes, and it's a serious mistake. Each language version must canonicalize to itself. If your German page canonicalizes to the English page while also being the German hreflang alternate, the tags contradict — and Google usually trusts the canonical, dropping the German page from its index.

This is one of several free SEO tools from Custom Web Audits. For a complete, prioritized analysis of your whole website, run a full audit.