What is Hreflang?
Also called: Language versions, rel=alternate hreflang
If your site exists in several languages, hreflang links name each version and the language it serves, for example en or nl-BE.
Why it matters
They help search engines show visitors the right language and avoid treating versions as copies. They only matter if you have more than one language version.
How Onbiom checks it
Onbiom reads the alternate language links on the homepage as first loaded. With none, the check is not applicable.
Otherwise it fails when a code is not valid, a code is listed twice, the page itself is not in the list, or there are several languages but no x-default version. Whether the other pages link back is not checked.
In your report this appears as: Valid language versions.
How to check it yourself
- Open your homepage source and search for hreflang.
- Check every language has one valid code, the page lists itself, and an x-default exists.
curl -s https://example.com/ | grep -io "<link[^>]*hreflang[^>]*>"Not sure about your own site? Paste your address and see in a minute which of these checks your site passes. Free, no account needed.
How to fix it
- WordPress
- Multilingual plugins add hreflang links for you. Check the plugin settings list every language.
- Shopify
- Shopify adds hreflang links when you set up Markets with several languages.
- Any website
- Ask your web person or hosting company to make the change, and send them the wording from your report.
Related terms
Sources and further reading
Last reviewed: