Technical
hreflang
hreflang is an annotation that links the translated or regional versions of a page to each other, using codes such as `en-gb` or `de-at`. It tells search engines which version to show to which searcher.
How it is measured
Look for `<link rel='alternate' hreflang='de' href='...'>` tags in the head, a `Link` header, or `xhtml:link` entries in the sitemap. Every page in the set must list all the others and itself, and each must link back. A missing return link invalidates the pair.
Validate with a crawler's hreflang report. The usual errors are missing return tags, a wrong code (`en-uk` should be `en-gb`), and targets that redirect or canonicalise to another page.
Worked example
A bike-parts store runs `/en/`, `/de/`, and `/fr/`. The German page lists en, de, fr, and `x-default`. The French page forgot the German link, so Search Console flags 212 URLs with no return tags and searchers in Vienna see the English page.
The fix is to generate every tag from one table of locale to URL and add `de-at` pointing at the same German address. A recrawl later, the errors clear.
How it differs
hreflang pairs equivalent pages in different languages. A canonical URL picks one page among duplicates. Each hreflang page should be its own canonical. If `/de/` canonicalises to `/en/`, the pairing is cancelled.
Common errors
Missing return links. Invented codes like `en-uk` or `jp`. Pointing at redirected or noindexed URLs. Setting a canonical on the translation that names the original. Tagging only the homepage. Using a region alone, such as `gb`, with no language.
In practice
Generate tags from one locale table rather than by hand. Include a self-reference and an `x-default`. Crawl once after each deploy and fix any no-return-tag errors. Prefer language-only codes unless the content really differs by region.