Made by DhawalMade by Dhawal
SEOFetches live pages

Hreflang/Canonical Validator

Check a page’s canonical and hreflang tags, then confirm every language version works and links back.

Updated 8 November 2026How to use it ↓

Checks the page, then fetches every language version it lists (up to 50) to confirm they all link back. Nothing is stored.

Enter a page to check its canonical link and hreflang tags, then every language version it lists: do they all work, stay canonical and link back to each other?

User guide

What this tool does

The Hreflang/Canonical Validator checks the two tags that tell search engines which URL is the real one and which version to show in each language or country. On the page you enter, it checks the canonical link and every hreflang link: valid language and country codes, full URLs, a link to the page itself, duplicates and conflicts. It then fetches every language version the page lists and checks that each one works, is canonical to itself, can be indexed, and links back with the same set. Finally it writes the corrected set as HTML tags, sitemap XML or an HTTP header.

When to use it

  • Launching a new language or country site: confirm every version links to every other before Google crawls them.
  • When the wrong language shows in search: a missing return link or a canonical pointing elsewhere is the usual cause.
  • After a migration or URL change: hreflang often still points at old URLs that now redirect.
  • When Search Console reports duplicate pages or “Google chose a different canonical”.

How to use it

  1. Choose the input.

    • Live URL: type any page in the set and press Check page. The tool checks it, then fetches every other version it lists, up to 50.
    • Paste HTML: for staging or pages behind a login. Paste the page’s source and its address. If the other versions are public, use Fetch the other versions to check them too.
  2. Read the left side. The Canonical card shows where the page points and any conflicts. The hreflang table lists each link with its language, and marks invalid codes, links in the body and this page’s own entry.

  3. Read the Language set. Each row is a page and each column a language code:

    • ● the page lists itself
    • ✓ it links to that version correctly
    • ✕ the link is missing
    • ≠ it points somewhere else

    Problems for each page are listed under the grid.

  4. Copy the fixed tags. Pick HTML, sitemap or HTTP header. Invalid codes are corrected where the fix is clear, and redirecting URLs are replaced by their final address. Put the same set on every page in the group.

The rules in brief

  • Every version lists every version, including itself. The same block of tags goes on each page.
  • Links must be confirmed from both sides (“return links”), or Google ignores them.
  • Use full URLs with https://. Relative URLs aren’t allowed in hreflang.
  • Codes are a language, then optionally a country: en, en-GB, pt-BR, zh-Hant-TW. The language comes first and is required. Use x-default for a page that serves everyone else, such as a language chooser.
  • Point only at canonical, working pages: no redirects, no 404s, no noindex, no pages whose canonical points elsewhere.
  • One method per page: HTML <head>, the HTTP Link header, or the XML sitemap.

Common code mistakes

Written Problem Use
en-UK UK isn’t a country code en-GB
en_US Underscore en-US
jp, cn, kr Country codes used as languages ja, zh, ko
es-419 Google doesn’t support area codes es, or one code per country
us, de-DE-x Country without language, or extra parts en-US, de-DE

Canonical in brief

  • Each page that should rank points its canonical to itself, as a full https:// URL in the <head>.
  • Duplicates, such as filtered lists, print versions and URLs with tracking parameters, point to the main version.
  • Declare it once. Conflicting canonicals (two different tags, or the HTML and the Link header disagreeing) are ignored.
  • Don’t combine noindex with a canonical to another page: the two signals contradict each other.

On AEM sites

  • Where the tags come from: hreflang tags usually come from the page component or a Sling Model reading language copies under /content/<site>/<language-root>. Check that every language root is included, including ones that were added later.
  • URL shortening: canonical and hreflang URLs should be the public URL as Dispatcher serves it, without /content/<site> or .html mismatches. Sling mappings and the Externalizer must agree.
  • Sitemaps: for large sites, the Apache Sling Sitemap generator in AEM as a Cloud Service can write hreflang into sitemaps, so templates don’t need changing.

Limits

  • The tool reads HTML as served, without running JavaScript. Tags added in the browser count for Google, but are less reliable.
  • It checks the set declared by the page you enter. Run it from another version too if the sets differ a lot.
  • At most 50 versions are fetched, three at a time. The fetcher allows 30 requests a minute per visitor.

FAQ

What are hreflang return links?
If the English page says the German version is at /de/, the German page must also link back to the English page. Google ignores hreflang pairs that aren’t confirmed from both sides, so every version should carry exactly the same set of links.
Should hreflang URLs match the canonical?
Yes. Each language version should be canonical to itself, and hreflang should point to those canonical URLs. If a page’s canonical points to another page, Google ignores its hreflang.
Is it en-UK or en-GB?
en-GB. hreflang uses ISO 3166-1 country codes, and the United Kingdom’s code is GB. Google ignores en-UK, as it does underscores (en_GB) and area codes like es-419.
HTML tags, sitemap or HTTP header: which should I use?
Any one of them works the same for Google. HTML tags are simplest; sitemaps suit large sites and AEM setups where templates are hard to change; the HTTP header is the only option for PDFs and other non-HTML files. Don’t mix methods for the same pages.
Is the page I check stored anywhere?
No. Pages are fetched through a small proxy that keeps no logs or copies, and pasted HTML never leaves your browser.