Skip to main content

HTML Guide

Bad value “en-EN” for attribute “hreflang” on element “link”: Bad region subtag.

The value en-EN is not a valid language tag for the hreflang attribute on a link element.

The hreflang attribute specifies the language (and optionally, the region) of the linked resource to help search engines and browsers deliver the correct localized version. Language tags should follow BCP 47 standards, with primary language subtags (like en) and optional region subtags (like US). A correct region subtag for English would be en-US (English as used in the United States) or en-GB (United Kingdom). Double language subtags like en-EN are invalid because the region subtag must be a valid country code, not a repeat of the language code.

Correct usage:

<link rel="alternate" href="https://example.com/en/" hreflang="en">
<link rel="alternate" href="https://example.com/en-gb/" hreflang="en-GB">
<link rel="alternate" href="https://example.com/en-us/" hreflang="en-US">

Incorrect usage:

<link rel="alternate" href="https://example.com/en-en/" hreflang="en-EN">

Use en, en-US, or en-GB as appropriate for English-language content, but never en-EN.

Learn more:

Related W3C validator issues