How hreflang works
Hreflang tells Google which version of a page to show to which language or region. Each version lists every version, including itself. If page A names page B, page B must name page A too, or Google may ignore the tags.
A code is a language in ISO 639-1 format, like en or de, plus an optional region in ISO 3166-1 alpha-2 format, like GB or MX. A region alone is not allowed, because Google does not work out the language from a country. The United Kingdom is GB, so the code is en-GB, never en-UK.
What x-default does
x-default names the page to show when no listed language matches the visitor's browser. It is optional, but Google recommends it. Point it at a language picker, or at the version you want everyone else to see.
HTML tags, sitemap or header
You can declare the same set in three places: link tags in the head of each page, xhtml:link entries in your XML sitemap, or an HTTP Link header. Google treats them the same, so one is enough. The header is for files without HTML, such as PDFs. The sitemap keeps page templates clean on large sites.
Questions
Is it en-UK or en-GB?
en-GB. The region is an ISO 3166-1 country code, and the United Kingdom's code is GB.
Does each page need to list itself?
Yes. Every version carries the full set, its own URL included. That is why the generator gives one set to paste on every page.
Can I use relative URLs?
No. Google requires fully qualified URLs, including https://.
Can two codes point to the same URL?
Yes. One page can serve en-GB and en-IE, for example. But one code can point to only one URL.
Guides for this
- Hreflang Checker Guide: How to Write, Test and Fix Hreflang TagsHow to use a hreflang checker, and how hreflang works: language and region codes, HTML, HTTP header and sitemap examples, return links, x-default and the errors that make search engines ignore your tags.
- Canonical Checker Guide: What a Canonical Tag Does and How to Check YoursHow to use a canonical checker, and what it is checking for: what rel canonical means, HTML and HTTP header examples, when to use a canonical tag, the mistakes that drop pages from Google and how to read Search Console's canonical reports.
- Breakdown: Dofollow Backlink Benefits for New StartupsA practical breakdown of how dofollow backlinks for new startup launch pages can improve discoverability, authority signals, and qualified acquisition when combined with strong launch execution.