What is Hreflang?
Hreflang tags tell search engines which language or region a page targets. Learn how hreflang works and how to avoid common validation errors.
Hreflang is an HTML attribute (or HTTP header / sitemap signal) that tells search engines which language or regional version of a page is intended for which audience. It helps Google show the right URL in the right country or language and reduces duplicate-content confusion across multi-language or multi-region sites.
How hreflang works
- You add
<link rel="alternate" hreflang="xx" href="https://..." />(or equivalent in sitemaps/headers) for each language or region variant. - The
hreflangvalue is usually a language code (e.g.en,es) or a region code (e.g.en-GB,en-US). - An
x-defaulthreflang often points to the fallback URL when no specific variant matches.
Common issues
- Invalid codes — Using non-standard or typo’d codes (e.g.
enginstead ofen) so search engines ignore or misapply the signal. - Mismatched or broken hrefs — The
hrefpoints to a wrong domain, 404, or doesn’t match the reciprocal link on the other version. - Missing reciprocation — Each variant should reference the others (and itself); missing links can weaken or invalidate the set.
How BearAudit checks them
BearAudit validates hreflang on each crawled page: we check that codes are valid, that href targets are reachable, and that reciprocal links are present where expected. We report errors and warnings so you can fix hreflang before it affects international or multi-language SEO.