Site SEO AI AuditInternet Solutionsilt

What Is hreflang? A Plain-English Guide for Site Owners

1. august 20268 min lugemistRahvusvaheline SEO
What Is hreflang? A Plain-English Guide for Site Owners

Short answer: hreflang is an annotation that tells search engines which language and regional versions of a page exist, so they can show a German searcher the German page and a British searcher the UK page. Each version must list every other version and itself, using valid language codes, and all versions must link back to each other. It is a hint, not a directive, and it does not make a page rank higher on its own.

What hreflang actually does

When a website publishes the same content in several languages or for several countries, search engines see a set of similar pages. Without help, they have to guess which one fits which searcher. Sometimes they guess wrong: the English page appears in Germany, or the US price page shows up for Australian users.

hreflang removes the guessing. It is a small piece of markup that says, in effect, “this page has these alternates, and here is who each one is for.” Google documents hreflang as the recommended way to tell it about localized versions of a page. Yandex also supports it. Bing has said it looks mainly at other signals, such as the content-language meta tag and the language of the text itself.

Three things hreflang does not do are worth stating early:

What a correct hreflang set looks like

Imagine a page that exists in English for the US, English for the UK and German for Germany. In the HTML head of each of the three pages, you would place the same block:

Notice the pattern. Every page lists all versions, including itself. The URLs are absolute, with protocol and domain. The value before the dash is the language, the value after it is the country. The last line, x-default, names the page to show when no other version matches the searcher.

This group of pages is often called a cluster. The key rule is that the cluster must be the same no matter which page you look at. If the German page lists four alternates but the UK page lists only two, the signals conflict and search engines may ignore some of them.

Language and region codes

hreflang values follow a fixed format. The language is a two-letter ISO 639-1 code such as en, de, fr or lt. The optional region is a two-letter ISO 3166-1 alpha-2 country code such as us, gb, de or lt. Case does not matter, but the order does: language first, then region.

Some rules catch people out again and again:

If you only have one version per language, you do not need region codes at all. A site with English, German and French pages can use en, de and fr. Add regions only when you really have different pages for different countries in the same language.

Three places to put hreflang

You can deliver the same information in three ways. Pick one per page and stay consistent; mixing methods makes errors harder to find.

Method Where it lives Best for Watch out for
HTML head <link rel="alternate"> tags in each page Most CMS sites, small and medium sites Adds weight to every page when there are many languages
XML sitemap xhtml:link entries under each URL Large sites, many languages, pages you cannot edit easily Sitemap must be kept in sync with real URLs
HTTP header Link: header in the server response PDFs and other non-HTML files Harder to see and debug; easy to forget

For a typical WordPress site with a multilingual plugin, the HTML head method is usually generated automatically. For a shop with tens of thousands of products in ten languages, the sitemap method keeps page weight down and is easier to regenerate in bulk.

The x-default value

x-default is a special value that does not describe a language. It marks the page to show when none of the listed versions fits the searcher. Common choices are a language selector page, the international English version, or the home page that redirects based on the visitor’s choice.

x-default is optional, but it is useful in two situations. First, when you target only some markets and want a sensible fallback for everyone else. Second, when your root URL shows a language picker or adapts to the visitor. In both cases, pointing x-default at that page makes your intent clear.

The most common hreflang errors

hreflang is simple to describe and surprisingly easy to break. In audits, the same problems appear on site after site:

  1. Missing return links. Page A lists page B, but page B does not list page A. Search engines may ignore one-way annotations.
  2. Links to redirected or broken URLs. The alternate points to an old URL that now redirects, or to a page that returns 404. Every alternate should return 200 directly.
  3. Links to non-canonical URLs. The hreflang points to a URL whose canonical tag points somewhere else. The two signals contradict each other.
  4. Links to noindex pages. An alternate that cannot be indexed cannot be shown, so the whole cluster becomes unreliable.
  5. Invalid codes. en-uk, se, jp, underscores instead of dashes, or invented regions.
  6. Missing self-reference. A page lists its alternates but forgets itself.
  7. Relative URLs. hreflang needs full absolute URLs, including https and the domain.
  8. Language mismatch. The page tagged de is actually still in English because the translation never happened.

Most of these problems are invisible when you look at the site in a browser. The pages load, the language switcher works, and nobody notices that search engines have quietly stopped trusting the annotations. That is why hreflang needs to be checked with a crawler, not by eye.

How to check your hreflang

A practical check has four steps:

  1. Pick one page in each language and view the source. Confirm that the hreflang block is present, lists every version, includes a self-reference and uses valid codes.
  2. Open every alternate URL. Each should load directly with status 200, without a redirect, and should be in the language its code claims.
  3. Compare the blocks. The list of alternates should be identical on every page in the cluster.
  4. Repeat at scale. On a site with hundreds of pages per language, manual checks only catch a sample. A crawler that follows every hreflang link and checks the return link is the only way to be sure.

Google Search Console no longer has a dedicated international targeting report; Google retired it in 2022. So in practice, hreflang errors are found by crawling the site yourself or with an audit tool.

How Site SEO AI Audit helps

Site SEO AI Audit crawls a website the way a search engine does and scores it across seven areas. One of them is Languages, which checks hreflang return links, broken language versions, x-default and lang attributes on every crawled page. Each issue is weighted by how many pages it affects, so a single forgotten page barely moves the score while a missing return link across a whole language version stands out. On WordPress sites every issue comes with the steps to fix it in wp-admin and the SEO plugin. You can run a free first audit to see where your language setup stands.

Related reading

The bottom line

hreflang is a map of your language and country versions for search engines. It works when every page in a cluster lists all versions, including itself, with valid codes and absolute URLs that return 200, and when every link is returned. It does not boost rankings, but when it is wrong, the wrong version of your page tends to show up in the wrong market. Set it up once, then check it with a crawler after every change to your language structure.

KKK

Do I need hreflang if my site has only one language?

No. hreflang only makes sense when the same content exists in more than one language or regional version. A single-language site should still set a correct lang attribute on the html element, but it does not need hreflang annotations.

Does hreflang help my pages rank higher?

Not directly. hreflang helps search engines show the right version of a page to the right searcher. A page that does not rank in a market will not start ranking because of hreflang alone.

Can I use hreflang across different domains?

Yes. Alternates can live on different domains, such as example.de and example.fr. The same rules apply: each version must list all the others and itself, and the links must be returned.

Should I use hreflang in the HTML head or in the sitemap?

Either works, and search engines treat them the same way. The head is simpler for most CMS sites, while the sitemap is easier to manage on very large sites with many languages. Use one method per page to keep things easy to debug.

Is en-uk a valid hreflang code?

No. The country code for the United Kingdom is gb, so the correct value is en-gb. Pages tagged en-uk are treated as having an invalid annotation.

#hreflang#International SEO#Multilingual SEO
Kontrollige oma saiti — tasuta.Kõik teie saidi SEO-probleemid — ja täpselt, kuidas neid parandada.
Alusta tasuta

Veel blogist

Kõik artiklid →
Internet Solutions

Veel meie meeskonnalt

Loonud Internet Solutions. Proovige ka meie teisi tooteid — iga üks säästab aega omal moel.

internet-solutions.net ↗
Site SEO AI Audit
Privaatsuse ülevaade

See veebisait kasutab küpsiseid, et saaksime pakkuda teile parimat võimalikku kasutajakogemust. Küpsiste teave salvestatakse teie brauserisse ja see täidab selliseid funktsioone nagu teie äratundmine, kui naasete meie veebisaidile, ning aitab meie meeskonnal mõista, millised veebisaidi osad on teile kõige huvitavamad ja kasulikumad.