Skip to content
Nazmul Nikhil
Menu

Issues With Hreflang Values (Semrush): Use Valid Language and Region Codes

Semrush found hreflang codes that aren't valid ISO codes, like "en-UK" or "uk" for English. Here's the correct format and a quick list of common mistakes.

Nazmul Nikhil

By

Head of SEO & Assistant Manager, Digital Marketing at Notionhive

Published 1 min read
Issues With Hreflang Values (Semrush): Use Valid Language and Region Codes
Photo: Markus Winkler on Unsplash

In short

Semrush flags "Issues with hreflang values" when a hreflang attribute doesn't use a valid code: an ISO 639-1 language code, optionally followed by an ISO 3166-1 alpha-2 region code. Invalid annotations are ignored. Fix the codes in your templates or plugin settings.

Hreflang only works if search engines recognize the codes, and a few common codes are wrong.

Format

language or language-REGION, for example en, en-US, fr-CA. Use x-default for the fallback page. The language always comes first; a region alone isn't allowed.

Common mistakes

Wrong Right Why
en-UK en-GB The ISO country code for the UK is GB
uk (meaning English for the UK) en-GB uk is the language code for Ukrainian
US en-US Region-only codes are invalid
en_US en-US Use a hyphen
jp ja Japanese is ja; JP is the country
cn zh-CN Chinese is zh

How to fix it

WordPress: check the language settings in WPML, Polylang or TranslatePress. Shopify: Markets and languages generate codes automatically; check custom hreflang in the theme. Webflow: Localization settings. Wix: Multilingual settings. Custom builds: keep codes in one config list and validate them.

This guide isn't affiliated with or endorsed by Semrush.

Sources and references

TAGSSemrush Site AuditSemrush hreflang valuesInvalid hreflang codeHreflang format
Nazmul Nikhil

About the author

Nazmul Nikhil

Head of SEO & Assistant Manager, Digital Marketing at Notionhive

SEO and AI search consultant in Dhaka, Bangladesh, helping small and mid-size businesses in the USA, UK, Australia and Canada.

Need help with this?

Get it fixed with International SEO

I find the issues that cost you traffic and fix them, starting with the pages that matter most.

Keep reading

Related articles

All Site Audit Issues posts →

Get the next guide in your inbox

One email when a new SEO or AI search guide goes live.

Ready to grow?

Get a free audit of your website, or book a 30-minute call to talk through your goals.

Nazmul Hasan

Talk to Nazmul directly

Reply within 24h

WhatsApp +880 1682835118
nazmulnikhil@gmail.com