SEO - Document doesn't have a valid hreflang
See original GitHub issueProvide the steps to reproduce
What is the current behavior?
SEO error with Document doesn't have a valid hreflang
but there are only 3 and all seem to follow the spec.
What is the expected behavior?
I checked several times and even read https://hreflang.org/what-is-a-valid-hreflang/ and can’t figure out what’s wrong. The error is too wide to be actionable.
Issue Analytics
- State:
- Created 2 years ago
- Comments:5
Top Results From Across the Web
Document doesn't have a valid hreflang - Chrome Developers
Document doesn't have a valid hreflang ... Many sites provide different versions of a page based on a user's language or region. hreflang...
Read more >How do you fix the "your site has no hreflang tags" issue?
Troubleshooting the “your site has no hreflang tags” error · Check bidirectional links. · Update your implementation when a page is deleted. ·...
Read more >[SEO Audits] Document has a valid hreflang code · Issue #3177
Success condition: Query selector head > link[rel=alternate][hreflang] doesn't exist, or the hreflang value passes aXe validation for each ...
Read more >Hreflang: The Easy Guide for Beginners - Ahrefs
Learn what hreflang tags are, when you should use them, how to implement them, and how to keep your website free of common...
Read more >hreflang: the ultimate guide • Yoast
This guide discusses what hreflang is, what it is for and gives in-depth information on how to implement it for your multilingual websites....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The SEO category is not just for what can work according to HTML spec, but about SEO best practices. I find that Stack Overflow answer rather misleading as the source article is specifically calling out the use of relative href as a common source of mistakes, not saying it should be used.
The official search documentation on this subject specifically recommends use of absolute URLs for all
hreflang
alternates.Until told otherwise by search, that’s what the audit will respect.
The error is below each item: “Relative href value”. You need to use absolute URLs.
Why do we check that in this audit? I’m not sure. Does anyone know?
Our docs don’t mention it either. https://web.dev/hreflang/
The string could be better.