How do you write hreflang and x-default correctly?
Google's documentation on multilingual sites (checked 2026-11-05) has five rules, and missing one can get the annotations ignored:
| Rule | How to write it |
|---|---|
| Point back to each other | Every language version must list all versions and link back; one-way annotations are ignored |
| Include itself | Each version's list also contains itself, and the list is identical on every version of the page |
| x-default | For visitors whose language matches none: point to a language selector or the default-language version; no language code needed |
| Where to write it | A link in the page head, an HTTP header, or xhtml:link in the sitemap: the three are equivalent, pick one, no need for all three |
| Language code | Language in ISO 639-1 (such as ja, ar), optionally a script (zh-Hant) or region (en-GB); a region alone is invalid; write full URLs including https |
A real example: MochiStamp's seven languages
MochiStamp is a LINE sticker site with seven language versions, each under its own URL prefix. Arabic and Persian are written right to left.
| Language | URL prefix | hreflang | Writing direction |
|---|---|---|---|
| Japanese | / | ja | Left to right |
| English | /en/ | en | Left to right |
| Traditional Chinese | /zh-hant/ | zh-Hant | Left to right |
| Simplified Chinese | /zh-hans/ | zh-Hans | Left to right |
| Arabic | /ar/ | ar | Right to left |
| Persian | /fa/ | fa | Right to left |
| Russian | /ru/ | ru | Left to right |
On 2026-11-05 we opened the live pages and checked hreflang. The home page lists all seven languages, with x-default pointing to English; the LINE sticker size guide exists in only four versions (Japanese, English, Traditional and Simplified Chinese), so its list has just those four; the Arabic WhatsApp sticker guide lists English, Arabic, Persian and Russian. In other words, hreflang lists only versions that exist, not pages that do not exist just to fill all seven languages. Each URL entry in sitemap.xml also carries the same xhtml:link entries and x-default.
What should you watch for with Arabic and Persian (right to left)?
Google's hreflang documentation says nothing about writing direction; this part is MochiStamp's practice, not a Google rule:
1. The page declares language and direction
The Arabic pages' html tag has lang set to ar and dir set to rtl (checked on the live page 2026-11-05). Persian is the same.
2. Styles use only logical directions
Styles use logical directions such as inline-start and inline-end, never hard-coded left and right, so one stylesheet works in both directions (MochiStamp's house rule).
3. Copy written in that language itself
Each language's page has its title, description and body written in that language, not a Chinese or English page wrapped in another layer. People search in their own language; the real queries in these two languages are in the next section.
How many impressions do the language versions really get?
These are MochiStamp's most-impressed pages in Search Console over the last 28 days (scoreboard generated 2026-11-05). The whole site had 2,596 impressions and 67 clicks in 28 days.
| Page | Impressions, last 28 days |
|---|---|
| /en/guide/size (English) | 158 |
| /ar/guide/whatsapp-stickers (Arabic) | 141 |
| /en/guide/whatsapp-stickers (English) | 138 |
| /ar/phrases/kimochi (Arabic) | 86 |
| /zh-hant/ideas/new-year (Traditional Chinese) | 81 |
| /zh-hant/phrases/koibito (Traditional Chinese) | 71 |
| /fa/phrases/kihon (Persian) | 53 |
On the same topic, the WhatsApp sticker guide has 141 impressions in Arabic and 138 in English, about the same; 3 of the 10 most-impressed pages are Arabic or Persian. For how the Arabic page is written, see MochiStamp's Arabic WhatsApp sticker guide; an English example is MochiStamp's LINE sticker size guide.
But impressions are not clicks. Several Arabic and Persian queries sit at positions 5 to 10 with 0 clicks in 28 days: ملصق زعلان had 12 impressions at average position 6.1; استیکر در جواب مرسی had 13 impressions at 8.7. The sample is tiny (a single query has at most a dozen or so impressions), so draw no conclusion; it only shows that multilingual pages do earn impressions in other languages.
Does hreflang help AI search?
We did not check, page by page, whether OpenAI's or Perplexity's crawler documentation mentions hreflang, so we cannot say AI search reads it. hreflang is an annotation from Google's documentation; what is certain is that it helps Google show each language's users the matching version in results. For AI search, these practices do not depend on hreflang and still help:
1. One URL per language
Do not switch language with scripts or cookies. Crawlers fetch by URL, and a URL maps correctly only if it has one language.
2. Body output by the server
Most AI crawlers do not run JavaScript; see Do AI crawlers render JavaScript. If a multilingual page fills in the translation with scripts, the crawler reads an empty page.
3. Write title and description per language
Aim the title and description at questions people really search in that language, rather than translating the English one word for word.
4. Keep sitemap lastmod trustworthy
Give each language version a date that follows its own content changes; see how to write a trustworthy sitemap lastmod for how to write it.
5. Check yourself with the audit checklist
Whether crawlers can get in and read the body: go through AI visibility audit checklist item by item.
FAQ
Do you have to write x-default for hreflang?
Google's documentation treats x-default as the fallback page when no language matches. It is advisable when the site has a language selector or a clear default language. MochiStamp's x-default points to the English version.
Does hreflang go in the page or in the sitemap?
Google says a link in the page head, an HTTP header and xhtml:link in the sitemap are equivalent; pick one. MochiStamp writes the same content in both the page head and the sitemap.
Some pages exist in only some languages. How should hreflang be written?
List only the versions that really exist. MochiStamp's LINE sticker size guide has just four versions (Japanese, English, Traditional and Simplified Chinese), so its list has only those four.
Do Arabic and Persian pages need special handling?
Google's hreflang documentation says nothing about writing direction. MochiStamp's practice is to declare dir as rtl on the page, use only logical directions like inline-start and inline-end in styles, and write the copy in that language itself.
Will hreflang make ChatGPT or Perplexity cite me?
We have not verified it. We did not check their crawler documentation page by page for hreflang, so we draw no conclusion. The steadier approach is one URL per language with the body rendered by the server.
Sources
- Google Search Central · Tell Google about localized versions of your page (checked 2026-11-05)
- MochiStamp · WhatsApp stickers guide (Arabic), hreflang and page source (Live page, checked 2026-11-05)
- MochiStamp · Search Console data, last 28 days (Local data dashboard, read 2026-11-05)
- kagentx evaluations: the data on the case study pages; each example gives its date.