hreflang for Language Versions: Return Links and x-default
When a page exists in several languages or regional variants, hreflang annotations tell search engines which version to show to which audience. They do not merge or rank pages; they help the right version appear for each searcher. The annotations only work when every version agrees with the others.
Declaring alternate versions
Each version lists all versions in the set, including itself, with a language code and an optional region code. Language codes use ISO 639-1, such as en or vi, and regions use ISO 3166-1 alpha-2, such as GB or VN. URLs must be absolute.
Annotations can be placed as link elements in the head, as HTTP Link headers for non-HTML files, or in an XML sitemap. Use one method per set to keep maintenance simple.
<link rel="alternate" hreflang="en" href="https://example.com/en/guide/">
<link rel="alternate" hreflang="vi" href="https://example.com/vi/guide/">
<link rel="alternate" hreflang="x-default" href="https://example.com/guide/">Return links and x-default
If the English page points to the Vietnamese page, the Vietnamese page must point back to the English one. Missing return links cause the annotation to be ignored for that pair. Generating the full set from one shared list of versions is the simplest way to keep links reciprocal.
The x-default value names the page to show when no listed language or region matches, often a language selector or the main international version.
Common mistakes
Frequent errors include pointing hreflang at redirected or non-canonical URLs, using country codes in place of language codes, and annotating pages whose content is not actually translated. Each listed URL should be the canonical, indexable version of that language.
Check annotation reports and crawl a sample of each language version after template changes.