Fail

An hreflang code isn't valid

The short version

Use a language code with an optional region, such as en-GB.

What it means

An hreflang value isn't a valid code. Valid values are a two-letter language code (en, de), optionally followed by a script (zh-Hant) and a two-letter region (en-GB, pt-BR), separated by hyphens, or the special value x-default. Common mistakes are en-UK (the region code is GB), underscores such as de_DE, country codes used as languages (jp instead of ja) and full names such as english.

Why it matters

Search engines ignore alternates with invalid codes, so visitors may land on the wrong language version, and the pages compete with each other instead of being shown to the right audience.

How to fix it

  1. Check each code in the detail; where we suggest a correction, use it.
  2. Use hyphens, not underscores.
  3. Use ISO 639-1 for the language and ISO 3166-1 for the region; the region is optional.
  4. Update every page in the set, since each one lists all the others.

Check it worked

Run the structured data validator again. The hreflang table should show no invalid codes and the finding should be gone.