Neova高级 SEO 平台

hreflang 值无效

在 Neova 中 直接在抓取过程中运行,无需任何设置。

规则最近审核:2026年10月17日 · 指南更新:2026年10月17日

Google 接受 ISO 639-1 语言代码,可选加上 ISO 3166-1 Alpha 2 地区代码或 ISO 15924 文字代码,或 x-default。其他形式的值无法使用。

您可以做什么

把每个值更正为 en、en-GB 或 zh-Hant 这样的形式,使用连字符而不是下划线。

Neova 如何发现

Neova 对照规则检查服务器对每个地址的响应。

Neova 为何标记

  • Google 只支持 ISO 639-1 语言代码,可选加上 ISO 3166-1 Alpha 2 地区代码,以及 x-default;其他值不会被使用。
  • 使用下划线(如 en_GB)或未知代码会让标注无法使用。
  • 搜索者于是可能看到错误语言的版本。

来源

生成的工单

这一部分目前只有英文版。

HR-009 · Hreflang Value Is Invalid

How to Check the Fix: 1. Run the check again in Neova
2. Spot-check sample URLs across affected templates
3. Record the re-check date and period label next to the baseline

Neova writes this ticket for every affected page group and sends it to Jira, Linear, Asana and the rest, after you approve it.

完整指南

这一部分目前只有英文版。

What This Check Flags

Neova detected outgoing hreflang annotations whose language-region codes are malformed — things like en-UK, gb, en_us, or a made-up region. Google validates every code against ISO 639-1 for language and ISO 3166-1 Alpha-2 for region; anything that fails is silently dropped, so the annotation does nothing and the intended market never gets its localized page.

Why the Exact String Matters

Hreflang codes look forgiving but aren't. The language must be a two-letter ISO 639-1 code, optionally followed by a hyphen and a two-letter ISO 3166-1 country code — and the country subtag is a country, not a language or a common abbreviation. The single most frequent mistake is en-UK: "UK" is not the ISO country code for the United Kingdom, GB is. Google reads en-UK, finds no matching region, and discards the row. The same fate meets an underscore instead of a hyphen, a three-letter code, an uppercase-only language, or a region attached to a language that can't take one.

A Real Failing Example

Four of these five rows are invalid — and each fails for a different reason:

<link rel="alternate" hreflang="en-UK" href="https://example.io/uk/" />    <!-- UK is not a country code; use GB -->
<link rel="alternate" hreflang="en_us" href="https://example.io/us/" />    <!-- underscore; must be a hyphen -->
<link rel="alternate" hreflang="eng-ca" href="https://example.io/ca/" />   <!-- eng is ISO 639-2; hreflang uses 639-1 (en) -->
<link rel="alternate" hreflang="es-419" href="https://example.io/latam/" /><!-- 419 is a UN M49 region, unsupported by Google -->
<link rel="alternate" hreflang="de-de" href="https://example.io/de/" />    <!-- the only valid row -->

Corrected to codes Google accepts:

<link rel="alternate" hreflang="en-gb" href="https://example.io/uk/" />
<link rel="alternate" hreflang="en-us" href="https://example.io/us/" />
<link rel="alternate" hreflang="en-ca" href="https://example.io/ca/" />
<link rel="alternate" hreflang="es" href="https://example.io/latam/" />   <!-- generic Spanish instead of es-419 -->
<link rel="alternate" hreflang="de-de" href="https://example.io/de/" />
<link rel="alternate" hreflang="x-default" href="https://example.io/us/" />

The Mistakes, Spelled Out

Invalid Code Why It Fails Correct Form
en-UK UK is not an ISO 3166-1 code en-gb
en_us Underscore separator; hyphen required en-us
eng / eng-ca Three-letter (ISO 639-2) language en / en-ca
us alone Country with no language prefix en-us
es-419 UN M49 region code, unsupported es
zh-cmn Extra subtag Google ignores zh or zh-cn

How to Detect It

  1. Screaming Frog — Hreflang tab. Crawl and apply the Incorrect Language & Region Codes filter, which lists every annotation whose subtags don't validate. Export it, and note that Frog checks the syntax even when the URL resolves fine, so it catches codes GSC would just drop.
  2. Google Search Console. The International Targeting report that used to surface "unknown language code" and "no return tags for the specified language", both classic invalid-code symptoms, was deprecated in 2022, so catch those with a crawler instead. URL Inspection shows you the alternates Google actually accepted for a page, so anything missing there was rejected.
  3. An hreflang validator. Run the set through a validator such as the Hreflang Validator; it checks each subtag against the ISO lists and names the exact offending row. To avoid re-introducing typos, build fresh markup with the Hreflang Tag Generator.

How to Fix It

  1. Pull every distinct hreflang value used across the site and check each against the ISO 639-1 language list and the ISO 3166-1 Alpha-2 country list.
  2. Replace abbreviations with real codes — the big one is UK → GB. Swap underscores for hyphens and trim any three-letter or M49 subtags.
  3. Decide, per market, whether you actually need a region subtag. If you serve all Spanish speakers one page, use bare es; don't invent es-419.
  4. Push the corrected codes through your single delivery method, keep the return tags consistent with the new keys, and re-crawl to confirm the Incorrect Language & Region Codes filter is empty.

If the mislabelled versions overlap with other flags, our writeups on unsupported or misconfigured hreflang and conflicting hreflang entries cover the neighbouring failure modes, and the hreflang implementation guide lists the accepted code format in full. Stick to one method for the whole set and never split it across head tags and a sitemap.

FAQ

Is the Region Subtag Ever Required?

No. Language alone (fr, de, ja) is valid and often preferable. Add a region only when you truly serve a country-specific page, because fr-ca and fr-fr then compete for the same speakers.

Does Case Matter?

Google is case-insensitive, so en-GB and en-gb both work. Pick one style and keep it consistent to make audits easier — but casing alone won't cause the flag.

Why Is en-UK so Common If It's Wrong?

Because "UK" is the everyday abbreviation and feels obviously correct. ISO 3166-1 assigns the United Kingdom the code GB; UK is reserved but not the assigned Alpha-2 country code Google expects.

Can I Use a Script Subtag Like zh-Hant?

Google supports language plus country, not script subtags, for hreflang. Use zh-tw or zh-hk to target traditional-script markets rather than a script tag.

在您自己的网站上找到它

Neova 在每次抓取时都会运行此检查项和其他所有检查项,然后把修复方法写成工单交给您的团队。

  • 适用于 Mac、Windows 和 Linux 的桌面应用
  • 全部 696 项检查,每项都附来源
  • Search Console 和 Analytics 4,以只读方式连接
  • 工单发送到 Jira、Linear 和 Asana

下载 Neova Desktop Free 套餐,或免费试用 Solo 14 天,无需银行卡。

全部国际 SEO 检查 · 指南 · 检查项库

作者:Neova Labs · 返回检查项库