What is Hreflang?
Hreflang attributes are HTML tags that tell Google and Yandex (not Bing) which language and regional versions of a page exist. Format: <link rel="alternate" hreflang="de-AT" href="..." />. The value consists of language code (ISO 639-1) and optional country code (ISO 3166-1 Alpha-2). Important: Hreflang tags must be bidirectional - if page A points to page B, B must also point to A. x-default marks the default version. Implementation options: HTML tags, HTTP headers, or XML sitemap. Common errors: missing reciprocity, wrong language codes, forgetting self-referencing tags.
Key Points
- Only supported by Google and Yandex
- Bidirectional references required
- x-default for default version
- Include self-referencing tags
- Can be in HTML, HTTP header, or sitemap
- Common error source for international sites
Practical Example
“For the Austrian and German versions we use hreflang="de-AT" and hreflang="de-DE".”