rtl no dir

warning rtl-no-dir hreflang and language versions

The page is in a right-to-left language — its `` is Arabic, Persian, Urdu, Pashto, Sindhi, Uyghur, Sorani Kurdish, Hebrew, Yiddish or Dhivehi, or it has no `lang` and at least 200 letters of its main text, eight in ten of them in Arabic, Hebrew, Thaana, Syriac or N'Ko script — and neither `` nor ``, `

`, `
`, `
` or a `
` carries `dir="rtl"` (or `dir="auto"`), no CSS sets `direction: rtl` and no script sets the direction on load. Without it the browser lays the text out left to right: the full stop and brackets land on the wrong side, a number, a price or a Latin brand name in the middle of a sentence reorders the words around it, and lists and tables hug the left edge. Search engines do not rank by `dir`; readers who bounce back to the results do. An explicit `dir="ltr"` on `` of such a page gets its own wording. Markdown sources are not judged: the direction belongs to the template.

What indexgap reports

The finding reads:

warning  rtl-no-dir  the page is in a right-to-left language (…), yet <html> declares dir="ltr": paragraphs, punctuation and tables will be mirrored. It needs dir="rtl"

How to fix it

Put <html lang="ar" dir="rtl"> in the template (for Persian, Urdu and Hebrew, their lang). On a bilingual site take dir from the page's language, and set spacing with logical CSS properties (margin-inline-start) rather than left/right.

How it behaves at scale

Collapsed when it fires template-wide. If it appears on 90% or more of the pages — or of one language version — of a site with at least 20 pages, it is a property of the template and is reported once, with the count, instead of once per page.

Finding it

pipx install indexgap
cd your-project
indexgap init
indexgap check

Then indexgap brief turns every finding on this page into a work order in indexgap-briefs/, with the thresholds the result has to satisfy and the command to check it.

Related checks in hreflang and language versions

All checks · hreflang and language versions