Make hreflang tags for the language and country versions of a page, as HTML link tags, XML sitemap entries or an HTTP header, with every code checked against the ISO lists Google uses. Or check a live page: the tool reads its hreflang, flags wrong codes, a missing x-default or self-link, and opens each version to see whether it links back.
hreflang tells Google which language and country each version of a page is for, so a searcher in Vienna sees your Austrian German page and a searcher in Sydney sees the Australian English one. The tags are simple, but they break easily: a wrong code such as en-UK, a version that doesn't link back, or an address that redirects, and Google quietly ignores the whole set. This tool builds the tags in all three formats Google reads, checks every code against the ISO lists, and checks a live page and the versions it names.
Tip: Pick one place for hreflang, the HTML or the sitemap, and generate it from the same source as your pages. Most hreflang problems come from versions being added or moved without every other version being updated.
The most common is en-UK: the United Kingdom's code is GB, so en-UK is ignored. Next come underscores (en_US, a habit from software locales) and country codes used as languages: jp instead of ja for Japanese, cn instead of zh, gr instead of el, dk instead of da, cz instead of cs, ua instead of uk, vn instead of vi, and in, which is India's country code, not Hindi. Some mistakes are valid codes for another language: kr is Kanuri, not Korean (ko), se is Northern Sami, not Swedish (sv), ee is Ewe, not Estonian (et), and uk alone means Ukrainian, not English for Britain. The tool warns about each of these.
Region codes that aren't single countries are also ignored by Google: es-419 (Latin America), en-EU and en-UN. For Spanish across Latin America, use plain es for the shared version, or list each country you target (es-MX, es-AR, es-CO). The tool also flags the same code used for two different addresses, addresses without https:// and the domain, #fragments, a missing x-default and sets with only one version.
All three work equally well for Google; choose the one that is easiest to keep correct. HTML link tags go in the <head> of every version, and each version lists all the others and itself. That's easy for a handful of languages, but adds many tags to every page on large sites. The XML sitemap puts the same information in one file, with a <url> entry for each address listing all its versions: no page code changes, and simple to generate from a database. The HTTP Link header is for files without a <head>, such as PDFs.
Don't mix methods with different information. If you move hreflang from the HTML to a sitemap, remove the old tags, or Google sees two sets that disagree.
Check a page fetches the address once and reads every hreflang link in its <head> and in its Link header. It flags links placed after <head> has ended, which Google doesn't read (a stray <img>, <div> or script output above them closes the <head> early), checks that the page lists itself with its exact address, and warns when the page's canonical tag points somewhere else or the page is marked noindex, since Google then ignores its hreflang.
Check return links opens up to 20 of the versions named. Each must answer 200 without redirecting, list the checked page with exactly the same address (protocol, www and trailing slash included), and call itself by the same code. A missing return link is the most common reason hreflang has no effect: Google only trusts a pair when both pages confirm it. Hreflang placed only in a sitemap isn't seen by this check; paste the sitemap's sets into Create tags to check their codes.
Use the canonical, final address of each version. A link to an address that redirects or returns 404 breaks the pair.
hreflang is for equivalent pages. Link the German product page to the English product page, not to the English home page.
Targeting en-GB and en-US? Add plain en as well, so English speakers in other countries get a sensible version.
Automatic redirects based on IP or browser language can hide versions from Googlebot, which mostly crawls from the US. Suggest a version with a banner instead.
Each version's canonical tag should point to itself, never to the main language version.
Re-run the live check after adding a language, moving a site or changing URL structure.
No. hreflang only matters when the same page exists in more than one language or for more than one country.
Bing gives it little weight and relies more on the content-language meta tag and the html lang attribute, so set those too.
No, but it's recommended. Without it, people outside every listed language and country get whichever version Google guesses.
Yes. List the same address under several codes, such as en-IE and en-GB, if one page really serves both.
Usually a version doesn't link back, redirects, or is canonical to another page. Run Check return links on the version that should appear and fix what it marks in red.
No. Tags are built in your browser. A live page is fetched once by our server for the check and isn't kept.
Updated