Hreflang checker
Check a page’s language tags against the checks in an Evisio SEO audit report: whether it declares a language at all, and whether its hreflang tags agree with the page’s own lang attribute. Enter a page URL to see the page language and up to 10 hreflang tags, in seconds.
What are hreflang and html lang?
The lang attribute on the page’s <html> tag says what language the page is written in. Hreflang tags go further: on a site with several language or country versions, they list every version of the page so search engines can show each searcher the right one:
<html lang="en-US">
<link rel="alternate" hreflang="en-us" href="https://www.example.com/">
<link rel="alternate" hreflang="es-us" href="https://www.example.com/es/">
<link rel="alternate" hreflang="x-default" href="https://www.example.com/">
Codes are a language, such as en or es, optionally followed by a country, such as en-gb. x-default marks the version to show when no other one fits.
Why language tags matter for SEO
For a site in one language, the lang attribute is all you need. It helps browsers offer translation, helps screen readers pronounce the text correctly, and confirms the page’s language to search engines.
For a site in several languages or countries, hreflang stops the versions competing with each other. Without it, Google may show your English page to Spanish speakers, or your UK prices to US visitors. With wrong codes, it may ignore the tags entirely.
How to use this checker
- Enter the full address of one page.
- Check the page language. It should match the language the page is written in.
- If your site has other language versions, read the hreflang list. Each version should appear with the right code and address, including this page itself.
What Evisio checks
Hreflang language mismatch
Fails when the page has hreflang tags but none of them is in the page’s own language, judged by the main language code: en-US and en-gb both count as English. x-default is ignored. This usually means the page forgot to list itself, or its lang attribute is wrong.
Hreflang and html lang attribute missing
Fails when the page declares no language at all: no lang attribute and no hreflang tags. A page with either one passes.
The checker reads one page, so it can’t confirm that the other versions link back. Check that by running each version through it.
How to check by hand
- View the page source (Ctrl+U on Windows, Option+Cmd+U on a Mac).
- The first lines should include
<html lang="...">with your language code. - Search for
hreflang. On a multilingual site, you should find one line per version, including this page.
How to fix language tag issues
- No language: on WordPress, set Settings > General > Site Language, and make sure your theme prints
language_attributes()in the<html>tag, as almost all do. Elsewhere, addlang="en"(or your language) to the<html>tag. - Mismatch: make sure each page lists itself in its hreflang set, and that its
langattribute matches its content. - Codes: use ISO 639-1 language codes and ISO 3166-1 country codes:
en-gb, noten-uk. - Return links: every version must list every other version. Multilingual plugins such as WPML and Polylang handle this for you.
More detail: fixing issues with hreflang links, setting up hreflang tags, issues with hreflang values and hreflang conflicts in page source code.
Check every page on your site
A free Evisio SEO audit report checks language tags on every page it scans, along with more than 80 other checks, and turns each problem into a task with step-by-step instructions.
Questions
Does a one-language site need hreflang?
No. A correct lang attribute is enough. Hreflang is for sites with more than one language or country version of the same page.
Should I use x-default?
Yes, if you have a version for visitors who don’t match any of your languages or countries, such as an international English page or a language picker.
Can hreflang go in the sitemap instead?
Yes. Google accepts hreflang in the page’s <head>, in HTTP headers or in the XML sitemap. This checker reads the tags in the page; if yours are in the sitemap, the hreflang list will be empty.