The three rules hreflang breaks on
- Return links. If the English page names the German one, the German page must name the English one. Missing return links are the most common reason Google ignores hreflang.
- Valid codes. Language is ISO 639-1 (
en,de,pt); region, if used, is ISO 3166-1 alpha-2 (gb,at,br).en-ukis a common mistake — the code for the United Kingdom isgb. - Self-reference. Each page lists itself as well as the others.
x-default
x-default names the page for everyone the other tags do not cover — usually a language picker or the international English version.
Tags can also go in the XML sitemap or HTTP headers; the set is the same either way. The generator flags invalid codes and duplicates as you type.