Skip to content
Nazmul Nikhil
Menu

Pages Have No Hreflang and Lang Attributes (Semrush): Declare the Language

Semrush flags pages with neither hreflang nor an HTML lang attribute. Every page should at least declare its language. Here's the one-line fix.

Nazmul Nikhil

By

Head of SEO & Assistant Manager, Digital Marketing at Notionhive

Published 1 min read
Pages Have No Hreflang and Lang Attributes (Semrush): Declare the Language
Photo: Myriam Jessier on Unsplash

In short

Semrush flags "Pages have no hreflang and lang attributes" when a page has neither hreflang tags nor a lang attribute on the <html> element. Every site should set lang: browsers use it for translation prompts and screen readers use it for pronunciation. Hreflang is only needed if you have the same content in several languages or regions.

This warning covers two different things, and most single-language sites only need one of them.

The fix for most sites

<html lang="en">

Use en-US, en-GB and so on if you want to be specific.

If you have several languages

Add hreflang tags linking each language version to the others, plus x-default. See the hreflang articles in this cluster for the rules.

Where to set it

WordPress: Settings > General > Site Language; themes print it via language_attributes(). If it's missing, the theme's header.php is outdated. Shopify: set by the store language; check the theme's <html> tag. Webflow: Site settings > General > Language. Wix: set by the site language. Custom builds: add it to the base HTML template.

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

Sources and references

TAGSSemrush Site AuditSemrush no hreflang and lang attributesHtml lang attributeMissing lang attribute
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