Prompt
How do I audit hreflang errors on an international site?
Latest observation
Auditing hreflang on an international site is mostly about checking three things:
- The tags exist and are complete
- They point to the right URLs
- They are consistent across all language/country versions
Here’s a practical process you can use.
1) Know what “good” hreflang looks like
A valid setup usually has:
- One
hreflangannotation per language/country version x-defaultfor the fallback page, if applicable- Each URL:
- references itself
- references all alternates
- uses the correct return links
- All URLs are:
- indexable
- canonicalized correctly
- consistent with sitemap and internal linking
Example:
<link rel="alternate" hreflang="en-us" href="https://example.com/us/" />
<link rel="alternate" hreflang="en-gb" href="https://example.com/uk/" />
<link rel="alternate" hreflang="fr-fr" href="https://example.com/fr/" />
<link rel="alternate" hreflang="x-default" href="https://example.com/" />
2) Crawl the site and extract hreflang
Use a crawler such as:
- Screaming Frog
- Sitebulb
- Deepcrawl/Lumar
- Ahrefs site audit
- Semrush site audit
What to collect
For each page, export:
- Source URL
- Hreflang value
- Hreflang target URL
- Canonical URL
- Status code of target URL
- Indexability
- Page title / template group, if needed
What to look for
- Missing alternate tags
- Broken target URLs
- 3xx/4xx/5xx target URLs
- Hreflang pointing to non-canonical URLs
- Relative URLs instead of absolute URLs
- Wrong language/region codes
- Missing self-referencing hreflang
- Inconsistent hreflang sets between pages
3) Check for the most common hreflang errors
A. Missing return links
If page A points to page B, page B must point back to page A.
Problem:
/en/ references /fr/, but /fr/ doesn’t reference /en/.
Fix:
Ensure every language version lists the full set of alternates.
B. Wrong language/region codes
Use valid ISO codes.
Examples:
en-usen-gbfr-frde-de
Common mistakes:
en-ukinstead ofen-gbukinstead ofen-gbpt-brvspt-ptconfusion- uppercase/lowercase inconsistencies
C. Missing self-reference
Each page should include itself in the hreflang set.
Example on /en/:
<link rel="alternate" hreflang="en-us" href="https://example.com/us/" />
D. Non-indexable targets
Hreflang should only point to pages that can be indexed.
Avoid targets that are:
- noindexed
- blocked by robots.txt
- 404/410
- redirected
- canonicalized elsewhere
E. Canonical and hreflang conflict
A page can canonicalize to itself or another page, but the hreflang setup must match the canonical logic.
Best practice:
- Hreflang targets should be canonical URLs
- Don’t point hreflang at URLs that canonicalize to something else
F. Uneven or incomplete clusters
If one page has 10 alternates, its equivalents should have the same cluster.
Example:
- English page has
en,fr,de - French page has only
fr,en
That inconsistency can weaken signal.
G. Duplicate or conflicting hreflang entries
Watch for:
- Same language/region listed twice
- Multiple different URLs for the same code on one page
- Conflicting tags in HTML, HTTP headers, and XML sitemap
H. Hreflang in the wrong place
Hreflang can be implemented via:
- HTML
<link>tags - XML sitemap
- HTTP headers
Don’t mix contradictory implementations. If you use more than one method, they must agree exactly.
4) Validate language and country targeting logic
Ask:
- Is this country-specific or language-only?
- Are variants really equivalent content?
- Is
en-CAdifferent fromen-USenough to justify separate targeting? - Should some pages use
hreflang="en"rather thanen-us?
Use:
- language-only if content is generic for that language
- language-region if content differs by country
5) Check XML hreflang sitemap implementation
If hreflang is in sitemaps, validate:
- All alternate URLs are listed
- URLs are absolute
- Each URL set is complete
- Sitemap is submitted in Search Console
- Sitemap URLs are indexable and canonical
Example format:
<url>
<loc>https://example.com/us/</loc>
<xhtml:link rel="alternate" hreflang="en-us" href="https://example.com/us/" />
<xhtml:link rel="alternate" hreflang="en-gb" href="https://example.com/uk/" />
<xhtml:link rel="alternate" hreflang="fr-fr" href="https://example.com/fr/" />
</url>
6) Use Google Search Console for warnings
In Search Console, check:
- International targeting signals if available
- Coverage/indexing issues
- Sitemap processing
- Manual inspection of affected URLs
Google no longer has the old “International Targeting” report for many properties, so you’ll often rely on:
- Indexing reports
- URL Inspection
- crawler exports
- log files
7) Compare hreflang with canonical, sitemap, and internal links
These should align:
- Canonical URL = preferred indexable URL
- Hreflang target = canonical URL
- XML sitemap = canonical URLs
- Internal links = preferably point to canonical localized versions
If one of these points to a different URL pattern, errors appear.
8) Run a spot-check on critical templates
Audit:
- Homepage
- Category pages
- Product pages
- Blog/article pages
- Search pages, if applicable
- Any high-traffic landing pages
Templates often reveal systematic issues faster than checking random pages.
9) Prioritize fixes
Start with:
- Broken/redirected hreflang URLs
- Missing return tags
- Incorrect language/region codes
- Canonical conflicts
- Missing cluster members on high-value pages
- Sitemap discrepancies
10) Revalidate after changes
After fixes:
- Re-crawl
- Compare before/after exports
- Check sample URLs manually
- Monitor indexing and country/language performance over time
Quick checklist
- All pages have self-referencing hreflang
- All alternate URLs are included
- Return links are reciprocal
- URLs are absolute and canonical
- No 3xx/4xx/5xx targets
- No noindex/blocked targets
- Language-region codes are valid
- HTML/sitemap/header implementations match
-
x-defaultexists where needed - Clusters are complete and consistent
If you want, I can also give you:
- a hreflang audit spreadsheet template,
- a Screaming Frog step-by-step workflow, or
- a Python script to find hreflang errors automatically.