Bilingual & RTL ·

Arabic first, English second: building bilingual sites that rank in both

Right-to-left is not a mirror you apply at the end. How I build Arabic-first websites with one stylesheet, prerendered pages and a search presence in both languages.

By Kareem Mohamed, Web Developer at Digital House

Arabic first, English second: building bilingual sites that rank in both

Most of the websites I build serve the Gulf, so I build an Arabic-first website by default, which means Arabic is not a translation; it is the main audience. For Build IN, a fire and life-safety consultancy in Jeddah, Arabic lives at the root of the site and English under /en.

One stylesheet, two directions

The trick is to never write left or right. Every margin, padding and position uses logical properties, so the same CSS lays out correctly in both directions.

.card { padding-inline: 24px; margin-inline-start: auto; }
.icon { inset-inline-end: 16px; }

A small lint check fails the build if a physical property sneaks in. It sounds strict; it saves hours of “why is this arrow pointing the wrong way” later.

SEO for an Arabic-first website: HTML, not JavaScript

Every page is prerendered at build time in both languages, with its own title, description, canonical link, hreflang pair, Open Graph tags and JSON-LD. Search engines and link previews never depend on JavaScript to see the page.

  • hreflang links each Arabic page to its English twin, and back.
  • Arabic URLs are real Arabic slugs, not transliterations.
  • Sitemaps list both languages, so neither is discovered by accident.
If the Arabic version feels translated, the reader notices before they finish the first line.

For the full picture of running two languages on one site, read the bilingual Arabic and English website guide. The layout mistakes I see most often are in RTL website design mistakes, and the search side is in the Arabic SEO guide.