Crawly
Guide

hreflang: The Complete Guide

What hreflang is, when you actually need it, the mistakes that trip up most implementations, and how to find and fix them with Crawly.

What hreflang does

hreflang is an HTML attribute that tells search engines which version of a page to show to users in different regions or languages. Without it, Google has to guess - and it often guesses wrong, serving the English version to French-speaking users or the US version to UK visitors.

hreflang is placed in the <head> of each page and points to all language or regional variants:

<link rel="alternate" hreflang="en-gb" href="https://example.com/en-gb/page/" />
<link rel="alternate" hreflang="en-us" href="https://example.com/en-us/page/" />
<link rel="alternate" hreflang="x-default" href="https://example.com/page/" />

Each page in the group needs to reference all other pages in the group - including itself. This is the reciprocal requirement that trips up many implementations.

When you actually need it

You need hreflang if your site has multiple versions of the same content for different languages or regions. Common cases:

  • English UK and English US versions of the same pages
  • Fully translated sites (English, French, German, Spanish)
  • Regional pricing or content differences (US, CA, AU)

You do not need hreflang for a single-language site, even if you have international visitors. You also do not need it if regional differences are handled entirely by geolocation without separate URLs.

Common mistakes and how Crawly detects them

Missing x-default

The x-default tag specifies which version of the page to show when no other language or region tag matches the user's location or browser preference. Without it, Google makes its own choice.

Crawly's hreflang audit flags every page that has hreflang tags but is missing x-default. The fix is to add an x-default tag pointing to your preferred fallback URL (usually the main English or primary version).

Wrong language codes

hreflang uses ISO 639-1 language codes and ISO 3166-1 region codes. Common mistakes:

  • en-UK - wrong. The correct code is en-GB (Great Britain, not United Kingdom as an ISO code)
  • en-EN - wrong. Should be en for generic English or en-US / en-GB for regional variants
  • fr-FR for all French-speaking users - fine if you only target France, but missing fr as a catch-all for other Francophone regions

Crawly checks hreflang values against the valid ISO code list and flags any malformed or unrecognised codes.

hreflang pointing to non-200 URLs

If a hreflang tag points to a URL that redirects or returns a 404, Google cannot follow the signal. This is a common problem after migrations where hreflang tags were not updated to reflect the new URL structure.

Crawly cross-references hreflang target URLs against the crawled status codes and flags any that point to non-200 responses. Update the hreflang tags to point directly to the final URL (no redirects).

Missing reciprocal tags

Every page in a hreflang group must link to every other page in the group - including itself. If page A references page B in its hreflang, page B must also reference page A. Missing reciprocal tags mean Google cannot validate the relationship and may ignore the signals entirely.

How to run a hreflang audit in Crawly

Run a crawl of your site. In the Issues tab, look for hreflang-related warnings - Crawly groups these separately from other issues. Click any issue to see the affected URLs.

For pages with hreflang, the Pages tab shows the hreflang tags found on each URL so you can review them in detail. Export the list for your developer or CMS team.

To generate a new hreflang implementation from scratch, use the hreflang generator tool.

After fixing hreflang errors

Once your developer has applied the fixes, run a new crawl and compare it to the previous one using Crawl Comparison. The hreflang issues that were flagged before should no longer appear in the Issues tab.

hreflang changes can take several weeks to be reflected in Google's behaviour - monitor Google Search Console's International Targeting report to confirm the implementation is being picked up correctly.

Audit your hreflang implementation

Crawly checks every page for hreflang errors automatically. Free to download.

Download free