Free hreflang checker

Hreflang checkerfor your whole site.

Validate every hreflang tag in one crawl: language codes, return links, x-default, canonicals, redirects and noindex alternates. Every finding comes with the fix.

Crab — redirectchecker.io · Hreflang
Crab Hreflang tab listing invalid codes, missing return links and redirecting alternates
10 checks
on every hreflang tag
Every page
not one URL at a time
With fixes
en-UK → use en-GB
$0
no account, no limits
How it works

Test your hreflang tags in four steps

  1. 1

    Download Crab

    Download the free app for macOS, Windows or Linux.
  2. 2

    Crawl your site

    Enter your homepage. Crab reads hreflang from every page's HTML and HTTP headers.
  3. 3

    Open the Hreflang tab

    Every problem with the page, the code, the alternate URL and what's wrong. The Issues view groups them by type.
  4. 4

    Fix and re-crawl

    Each finding includes the fix. Crawl again and Compare shows which hreflang issues are gone.
Hreflang tester

The 10 hreflang checks

Everything Google needs to show the right language version, checked on every page.

Invalid language or region codes

Catches codes Google ignores and tells you the fix: en-UK → en-GB, en_US → en-US, iw → he.

Missing return links

If page A lists page B, page B must list page A. Without the return link, Google ignores the pair.

Alternates that don't return 200

Alternates that redirect, return 404 or 5xx. Hreflang must point at the final, working URL.

Inconsistent return codes

Page B links back to page A, but with a different language code than page A uses for itself.

Non-canonical alternates

Alternates whose canonical tag points somewhere else. Hreflang should only reference canonical URLs.

Noindex alternates

Alternates that tell search engines not to index them, which cancels the hreflang relationship.

Hreflang on non-canonical pages

Pages that carry hreflang but canonicalise to another URL. Google uses the canonical's annotations instead.

Duplicate entries

Two or more URLs for the same language code on one page, so search engines can't tell which one to show.

Missing self-reference

Each page should list itself among its alternates.

Missing x-default

No fallback for visitors whose language or country isn't covered.

Hreflang x-default, explained

x-default tells search engines which page to show when none of your languages match the visitor. It's usually your international homepage or a language selector.

  • Add it to every page in the set, pointing to the same fallback URL
  • The fallback page lists all alternates too, including itself
  • It's optional, but without it Google picks a version for you
  • Crab flags pages that are missing it
Every language version, in the <head>
<link rel="alternate" hreflang="en" href="https://example.com/" />
<link rel="alternate" hreflang="de" href="https://example.com/de/" />
<link rel="alternate" hreflang="es" href="https://example.com/es/" />
<link rel="alternate" hreflang="x-default" href="https://example.com/" />

Hreflang and canonical tags

The most damaging hreflang mistake is a canonical that points to another language. It tells Google the page is a duplicate, and the hreflang set falls apart.

  • Each language version canonicalises to itself
  • Hreflang points to the canonical URL of each alternate
  • Never canonicalise all languages to the English page
  • Crab flags non-canonical alternates and hreflang on non-canonical pages
On https://example.com/de/
<link rel="canonical" href="https://example.com/de/" />
<link rel="alternate" hreflang="en" href="https://example.com/" />
<link rel="alternate" hreflang="de" href="https://example.com/de/" />
Implementation

Hreflang in HTML, HTTP headers or XML sitemaps

Three equivalent ways to tell Google about your language versions. Use one per URL.

HTML <head>
<link rel="alternate"
  hreflang="de"
  href="https://example.com/de/" />
HTTP header (PDFs, files)
Link: <https://example.com/de/doc.pdf>;
  rel="alternate"; hreflang="de"
XML sitemap
<url>
  <loc>https://example.com/</loc>
  <xhtml:link rel="alternate"
    hreflang="de"
    href="https://example.com/de/" />
</url>

Crab checks hreflang in HTML and HTTP headers. Sitemap annotations are equally valid for Google; if you use them, keep the same rules: every URL lists all alternates, including itself.

Fix guide

Common hreflang mistakes and how to fix them

  1. 01

    Missing return links

    Add the missing annotation on the alternate, so both pages list each other.

    Most common
  2. 02

    Wrong codes: en-UK, en_US, english

    Use ISO codes with a hyphen: en-GB, en-US, en. Crab suggests the right code.

    Ignored by Google
  3. 03

    Alternates that redirect or 404

    Point hreflang straight at the final 200 URL, especially after a migration.

    After migrations
  4. 04

    Canonicals pointing to another language

    Self-referencing canonicals on every language version.

    Biggest impact
  5. 05

    No x-default

    Add a fallback for visitors your languages don't cover.

    Recommended
Comparison

Crab vs online hreflang testers

Online testers are handy for one URL. A crawler checks the relationships across the whole site.

CrabOnline single-URL testers
Pages checkedEvery page in one crawlThe URLs you paste
Return links across the site
Invalid codes with the fix
Alternates that redirect, 404 or are noindex
Canonical conflicts
HTTP header annotations
Re-check after fixes and compare
Full technical SEO audit in the same crawl

Capabilities of online testers vary by tool; “partial” means some testers support it for the URLs you provide.

FAQ

Frequently asked questions

Yes. Crab is a free desktop app with no URL limit and no account. The hreflang checks run on every crawl.

More questions? hey@crab.so or r/crabdotso

Check your hreflang tags in minutes

Free, no URL limits, every finding with the fix.

Download Crab, freemacOS · Windows · Linux · no account · no URL limits