hreflang explained: our 12-language setup and 5 common errors

By SEOgrinder · Published · Updated · 9 min read

Short answer: hreflang is an annotation that tells Google which pages are language or region versions of the same content, so Search can point people to the right one. Every version must list itself and all the others, and every pair must link to each other, or the tags can be ignored. Below is how seogrinder.com sets it up for twelve languages, followed by five hreflang errors taken from Google's documentation.

What does hreflang do, and when do you need it?

Google explains the idea on its page Tell Google about localized versions of your page: if you have several versions of a page for different languages or regions, telling Google about them will "help Google Search point users to the most appropriate version of your page by language or region".

Google lists three situations where this is recommended:

  • You keep the main content in one language and translate only the template, such as navigation and footer.
  • You have small regional variations of similar content in one language, for example English for the US, Great Britain and Ireland.
  • Your content is fully translated, for example a German and an English version of each page.

Google may find alternate versions on its own, but says it is usually best to indicate them explicitly. A translated page is not a duplicate: localized versions "are only considered duplicates if the main content of the page remains untranslated" (Google).

Two things hreflang is not. It is not how Google reads a page's language: Google says it "doesn't use hreflang or the HTML lang attribute to detect the language of a page" (Google), and its page on multilingual sites adds that it uses the visible content. And it is not a ranking promise: Google describes one purpose, showing each searcher the matching version.

How seogrinder.com connects twelve languages

This section describes the blog of seogrinder.com as we found it on 5 November 2026. The start page / carries no hreflang tags. Every article is a page of its own in one language. Read the tags yourself:

curl -sS https://seogrinder.com/en/blog/seo-audit-checklist | grep '<link rel="alternate" hreflang'

That prints 13 lines:

<link rel="alternate" hreflang="en" href="https://seogrinder.com/en/blog/seo-audit-checklist">
<link rel="alternate" hreflang="ar" href="https://seogrinder.com/ar/blog/qaimat-tadqiq-seo">
<link rel="alternate" hreflang="de" href="https://seogrinder.com/de/blog/seo-audit-checkliste">
<link rel="alternate" hreflang="es" href="https://seogrinder.com/es/blog/checklist-seo-auditoria">
<link rel="alternate" hreflang="fr" href="https://seogrinder.com/fr/blog/checklist-audit-seo-gratuite">
<link rel="alternate" hreflang="hi" href="https://seogrinder.com/hi/blog/seo-audit-checklist-hindi">
<link rel="alternate" hreflang="it" href="https://seogrinder.com/it/blog/checklist-audit-seo">
<link rel="alternate" hreflang="ja" href="https://seogrinder.com/ja/blog/seo-chekkurisuto">
<link rel="alternate" hreflang="ko" href="https://seogrinder.com/ko/blog/seo-chekeuliseuteu-jeomgeom">
<link rel="alternate" hreflang="nl" href="https://seogrinder.com/nl/blog/seo-audit-checklist-uitvoeren">
<link rel="alternate" hreflang="pl" href="https://seogrinder.com/pl/blog/checklista-seo-audyt">
<link rel="alternate" hreflang="pt" href="https://seogrinder.com/pt/blog/checklist-de-auditoria-seo">
<link rel="alternate" hreflang="x-default" href="https://seogrinder.com/en/blog/seo-audit-checklist">

What the block shows:

  • One method. The tags sit in the HTML head. These pages send no hreflang in an HTTP header, and sitemap.xml has no xhtml:link entries. Google calls the three methods equivalent and sees no benefit in using all of them.
  • Plain language codes. Twelve codes, no regions, because each language has exactly one version of the article.
  • The page lists itself. The en line is the page's own address. All twelve versions carry the same set of lines.
  • Plain tags. They sit in the <head>, one <link> each, with no extra attributes. Google asks for a well-formed head and warns against combining hreflang with attributes such as media in one tag.
  • Canonical points to itself. Each version names its own address as canonical, not the English one, which fits Google's statement that translated versions are not duplicates.
  • A separate address per language, no automatic redirect. /de/blog/seo-audit-checkliste has a German slug. Google recommends different URLs per language over cookies or browser settings and advises against redirecting visitors by their presumed language. A request to the English page with Accept-Language: de returns 200 and stays there (tested 5 November 2026). Each article also has a language menu with plain links to the other versions.

How it is built. Each article file names its topic in a group line. The blog code collects every file with the same group, prints one <link> per member (English first, then by language code) and sets x-default to the English member. A language without a file gets no line, so a topic that exists only in English and German carries three lines: en, de and x-default. Google allows incomplete sets: "you can omit some languages on some pages; Google will still process the ones that point to each other" (Google).

How we counted. This loop reads every article address from the sitemap and counts the hreflang lines on each page:

for u in $(curl -sS https://seogrinder.com/sitemap.xml | grep -o 'https://seogrinder.com/[a-z][a-z]/blog/[^<]*'); do
  curl -sS "$u" | grep -c '<link rel="alternate" hreflang'
done | sort | uniq -c

On 5 November 2026 it printed 408 13: 408 pages with 13 lines (twelve languages plus x-default). A small script then fetched the same 408 pages and compared the tags: every page lists itself, every listed address answers 200 and names the page back, and x-default equals the English address. Our blog check (check:blog) tests these rules for every article page whenever we change the blog.

What is x-default for?

Google calls x-default "recommended for specifying the fallback page for users whose language settings don't match any of your site's localized versions" (Google). It is not required.

Google adds that any page can carry the value, but that it "was designed for language selector pages and so it will work best with those". We have no selector page for articles, so our fallback is the English version of the same article; for the blog overview pages it is /en/blog. That is our decision, not a rule.

Common mistakes: 5 hreflang errors from Google's documentation

Google's page has a "Common Mistakes" section with three entries, and its guidelines state two more requirements with "must". These are the five below. Google does not say how often each occurs. Only two come with a stated consequence: missing return links (tags ignored) and reserved region codes (that part ignored). For the others the page states the rule.

If page X names page Y, page Y has to name page X. The rule in Google's words: "If two pages don't both point to each other, the tags will be ignored" (Google). Google gives the reason: someone on another site must not be able to declare itself an alternative version of your page. Fix it by printing the same block of links on every version, from one source. If a full set is hard to keep, Google allows omitting some languages on some pages, but says newly added languages should link both ways with the original or dominant one.

2. A version that does not list itself

The guideline for all methods: "Each language version must list itself as well as all other language versions" (Google). For the HTML method that means one link per variant "including itself", with an identical set on every version. Google does not say what happens without it, so treat it as an error and add the line.

3. Language codes that are not valid

The first part of the value is a language in ISO 639-1 format, optionally followed by a region. Google states: "Specifying the region alone is not valid". In its Belgium example be is wrong because it is the language code for Belarusian; the right codes are de-BE, nl-BE and fr-BE. Codes that are not in those standards, such as es-419, are not supported (script codes such as zh-Hans are allowed). Case does not matter, but uppercase regions follow the standard.

4. Region codes that are not valid

The region must be an officially assigned ISO 3166-1 Alpha 2 code. For codes reserved for something else, "Google Search ignores that part of the annotation". Google names EU, UN and UK as having no effect. For the United Kingdom the code is GB, as in Google's own example en-GB.

5. Relative or incomplete addresses

"Alternate URLs must be fully-qualified, including the transport method (http/https)" (Google). Google's example: https://example.com/foo, not //example.com/foo or /foo.

How do you check hreflang?

By hand: run the curl command above on one of your pages and see that the page lists itself. Then run it on each address in the output and look for the first page; that is the return-link test. Google also lists third-party debugging tools and says they "are not maintained or checked by Google".

With SEOgrinder, which is our own tool and which we build: scan a page, open the section "Page on Google" and find the card "Languages (hreflang)". It checks the codes, the self-reference, x-default, whether the targets answer and whether they link back. When everything is fine it shows one line; otherwise it lists each check with its result, and the problems go into the task list.

ErrorWhat SEOgrinder shows (example wording)
1. Missing return links"2 targets do not link back"
2. No self-reference"Page does not reference itself"
3 and 4. Invalid codes"1 invalid language code" (language and region are checked against the standards Google names)
5. Relative addressesNo line of its own: SEOgrinder resolves a relative address against the page before it checks, so look for this one in the source

Two limits. It fetches at most ten targets per page; on our pages with 13 entries it checks ten and says so ("10 of 13 entries fetched and verified"). And it judges the page you enter; for a whole site, loop over the addresses as above.

FAQ

Do I need hreflang if every language has its own address?

It is not required. Google may find alternate versions without it, but says it is usually best to indicate them explicitly.

Does hreflang improve my rankings?

Google's page does not claim that. It describes the purpose as pointing users to the most appropriate version by language or region. Nobody can promise a position.

Which of the three methods should I use?

They are equivalent for Google, and using several brings no benefit. Google notes that HTML tags suit sites without a sitemap or header control and that the header suits non-HTML files such as PDFs. We use the HTML tags.

Your next step

Run the curl command on one of your pages and check that it lists itself and that one target links back. Then scan the page with SEOgrinder, open "Page on Google", fix the first line in the card "Languages (hreflang)" that reports a problem, and press Check again. For the wider picture, our SEO audit checklist shows where hreflang sits among eight groups of checks.

Keep reading

More from the blog