Skip to content
Nazmul Nikhil
Menu

Document Doesn't Have a Valid hreflang (PageSpeed Insights)

PageSpeed checks your page's hreflang links for invalid language codes and relative URLs. Here's the correct format.

Nazmul Nikhil

By

Head of SEO & Assistant Manager, Digital Marketing at Notionhive

Published 1 min read
Document Doesn't Have a Valid hreflang (PageSpeed Insights)
Photo: Sam on Unsplash

In short

Only relevant if your page has hreflang tags for other languages or regions. PageSpeed checks each <link rel="alternate" hreflang> on the single page tested: the code must be a valid language (optionally plus region) or x-default, and the URL must be absolute. It can't check return links across your site; use a crawler for that.

In passed form: "Document has a valid hreflang."

<link rel="alternate" hreflang="en-GB" href="https://example.com/uk/">
<link rel="alternate" hreflang="x-default" href="https://example.com/">

The Semrush hreflang articles in this blog cover common code mistakes (en-UK instead of en-GB).

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

Sources and references

TAGSPageSpeed InsightsDocument doesn't have a valid hreflangHreflang lighthouseInvalid hreflang code
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 Page Speed & Core Web Vitals 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