Published by Qomvia, , 3 min read
Language is a routing decision
When a user in Zurich asks an assistant a question in German, the assistant prefers German sources for the answer. If your site has a German version but the page the engine fetched is undeclared, or declared as English because the template hard-codes lang="en", the engine has to guess from the text. Sometimes it guesses right. Sometimes it cites the English page to a German reader, or a French-language competitor instead.
Two declarations remove the guess. <html lang> states what language this document is in. <link rel="alternate" hreflang> states where the other language versions live and which one is the default. Together they let an engine pick the right page for the reader's language and market, and credit the right URL.
What Qomvia checks
Language and market are declared in the methodology is worth 4 points. A lang attribute on the document plus at least one hreflang alternate link passes. lang alone is 3 points with a note that no alternates were found. No lang at all fails, because the engine has nothing to route on. Single-language sites should still declare lang and can add an x-default alternate pointing at themselves.
The markup, done properly
<html lang="de-CH">
<head>
<link rel="alternate" hreflang="de-CH" href="https://www.brand.ch/de-ch/preise">
<link rel="alternate" hreflang="fr-CH" href="https://www.brand.ch/fr-ch/tarifs">
<link rel="alternate" hreflang="en" href="https://www.brand.ch/en/pricing">
<link rel="alternate" hreflang="x-default" href="https://www.brand.ch/en/pricing">
<link rel="canonical" href="https://www.brand.ch/de-ch/preise">
</head>- Every version lists every version, including itself. hreflang is reciprocal; a set that only links outward is ignored by Google and unreliable for everyone else.
- Use language, optionally with region.
de,de-CH,fr-CH,en. Region without language (CH) is invalid. - `x-default` names the fallback for readers whose language you do not serve. Usually the English or the language-selector page.
- Canonical points at itself, per language. A canonical from the German page to the English one tells engines the German page is a duplicate, which undoes the alternates.
- `lang` matches the page content. A German page with
lang="en"is worse than none: it is a confident wrong answer.
Sites that cannot edit the head can declare the same alternates in the sitemap using xhtml:link entries per URL. The result is equivalent for crawlers; agents fetching a single page only see the head version, so prefer the head when you have the choice.
Market matters as much as language
For a Swiss shop the distinction between de and de-CH is real: prices in francs, shipping within Switzerland, Swiss VAT. A German user asking a German-language assistant should get the de-DE page and a Swiss user the de-CH one. hreflang is the only mechanism that states this, and it is also what prevents the two pages from competing with each other as duplicates.
Questions
- We only have one language. Do we need hreflang?
- Set <html lang> and, if you want the full 4 points, one self-referencing x-default alternate. It also protects you when a translated version is added later.
- Does hreflang affect AI answers or only Google Search?
- It was designed for search engines, but it is the only standard statement of which page serves which language and market, and answer engines that fetch pages read the same head.
- Our site uses a language switcher with a cookie. Is that enough?
- No. Agents do not carry cookies between requests, so they always see the default. Give every language its own URL and declare the set.
Score your own site against the rubric this is written from.
Is your site agent-ready?
Free score against the same rubric, in under a minute.
Sign up free to keep the fixes and track the score.
AI monitor
PreviewHow often each model names your site across 11 tracked questions.