Prompt
How do I validate hreflang tags for international SEO?
Latest observation
Nov 7, 2026
OpenAI APIWeb search: off
To validate hreflang tags for international SEO, check implementation, correctness, and reciprocity. Here’s a practical approach:
1) Confirm the basics are correct
Each localized page should:
- Point to itself with a matching
hreflang - List all alternate versions of that page
- Use valid language/region codes, e.g.:
enen-usen-gbfrfr-ca
Use the format:
language-regionin lowercase, separated by a hyphen- Example:
en-USis often seen, but Google accepts language and region codes; best practice is consistency.
2) Make sure links are reciprocal
If page A references page B, page B must reference page A.
Example:
/us/pageincludes:en-usfr-ca
/ca/pageincludes:en-usfr-ca
If one page is missing the return link, the setup may be ignored.
3) Check all implementation locations
hreflang can be implemented in:
<link rel="alternate" hreflang="..." href="...">in HTML- HTTP headers
- XML sitemap
Make sure you’re not mixing incomplete sets across methods unless they’re all consistent.
4) Validate canonical tags
Common issue: canonical points to the wrong language version.
Best practice:
- Each localized page should usually canonically point to itself
- Don’t canonical all variants to one language page unless that is truly the preferred duplicate
5) Use tools to detect errors
Google Search Console
- Check International Targeting / language targeting reports if available
- Look for hreflang errors, missing return links, invalid codes, or conflicting canonical tags
SEO crawlers
Use tools like:
- Screaming Frog
- Sitebulb
- Ahrefs Site Audit
- Semrush Site Audit
These can detect:
- Missing reciprocal links
- Invalid language codes
- Non-200 URLs
- Canonical conflicts
- hreflang chains or loops
Manual inspection
Open page source and verify the tags directly.
Example:
<link rel="alternate" hreflang="en" href="https://example.com/en/" />
<link rel="alternate" hreflang="fr" href="https://example.com/fr/" />
<link rel="alternate" hreflang="x-default" href="https://example.com/" />
6) Ensure URLs are indexable
Each hreflang URL should:
- Return a 200 status
- Not be blocked by robots.txt
- Not be noindexed
- Not redirect unexpectedly
7) Include x-default if needed
Use x-default for a fallback page, often a country/language selector:
<link rel="alternate" hreflang="x-default" href="https://example.com/" />
8) Watch for common mistakes
- Wrong country code (
en-ukinstead ofen-gb) - Missing self-referencing tag
- Missing reciprocal links
- Broken URLs or redirects
- Non-canonical URLs in hreflang
- Inconsistent trailing slashes or HTTP/HTTPS variants
- Using hreflang for pages that aren’t equivalent
Quick validation checklist
- Every language/region variant has a self-referencing hreflang
- All alternates are listed on every variant
- Reciprocal links exist
- Canonicals are correct
- URLs are indexable and return 200
- Language/region codes are valid
-
x-defaultis used where appropriate - Tools show no errors
If you want, I can also give you:
- a hreflang validation checklist,
- a sample HTML implementation, or
- a Python script to audit hreflang tags across a site.