Use ISO 639-1 language and ISO 3166-1 region codes
Format: <link rel='alternate' hreflang='en-gb' href='https://example.com/uk/'>. Common mistakes: 'uk' (use 'gb'), 'en-uk' (use 'en-gb'), uppercase ('EN-GB' is fine but lowercase is standard).
Self-reference and reciprocity are mandatory
Every page must include an hreflang tag pointing to itself, plus tags for every alternate version. If page A links to page B but B doesn't link back, Google ignores the relationship.
Use x-default for the fallback
hreflang='x-default' tells Google which page to show users whose language/region you don't have a version for. Usually your English or global homepage.
Implement via HTML, HTTP header, or sitemap
Pick one method per URL and be consistent. Sitemap is best for large sites — easier to audit and update programmatically.