Skip to content

Web

Bilingual Arabic–English Websites: RTL, SEO and hreflang Done Right

Treat Arabic as a first-class language from day one: URL structure, hreflang, RTL layout, typography, native copy and a testing checklist.

By the CodeElectron engineering teamUpdated 6 min read
Illustration of an Arabic and an English website side by side with a right-to-left layout

Key takeaways

  • Give each language its own URL, such as /en and /ar, and link them with hreflang.
  • Design for both directions from day one using logical CSS properties.
  • Write Arabic natively, localise metadata and structured data, and choose fonts built for Arabic.
  • Test layout, forms, numbers and search snippets in both languages.

Why bilingual sites go wrong

Most problems come from treating Arabic as a translation layer added at the end. Layouts break, icons point the wrong way, search engines show the wrong language and the Arabic copy reads as if a machine wrote it. Planning both languages from the start avoids a costly rebuild.

URL structure and hreflang

Give each language its own URL, for example /en/services and /ar/services on one domain. This is the simplest and strongest setup for most businesses. Each page then declares its alternates with hreflang so Google serves the right version to the right searcher.

  • Each language version links to every other version and to itself.
  • Add an x-default alternate that points to your default language.
  • Keep canonical URLs self-referencing per language; never canonicalise Arabic pages to English.
  • Include both languages in the XML sitemap with alternate links.
  • Avoid redirecting by IP alone. Let users switch language and remember their choice.

RTL layout: use logical properties

Write CSS with logical properties, such as margin-inline-start, padding-inline-end and text-align: start, instead of left and right. The layout then mirrors automatically when the page direction changes. Mirror icons that imply direction, such as arrows and progress indicators, and keep numbers, phone numbers and code in left-to-right runs.

Arabic typography

Choose fonts designed for Arabic, such as IBM Plex Sans Arabic, Tajawal or Cairo, rather than letting the browser fall back to a system font. Use a taller line height than for Latin text, avoid negative letter-spacing because it breaks the joining of Arabic letters, and check headings at every breakpoint.

Writing Arabic for people and for search

Write the Arabic page for Arabic readers: natural phrasing, local terms and the words people really search for. Direct translation rarely matches search behaviour because users search differently in each language. Research keywords separately for Arabic and English, then write the title and description for each.

  • Localise the title, meta description, Open Graph tags and image alt text.
  • Translate structured data fields such as names, descriptions and FAQ answers.
  • Set the lang and dir attributes on the html element for each version.
  • Keep URL slugs consistent and encoded correctly across languages.

Forms, dates and numbers

Test forms with Arabic input, long names and mixed-direction text. Decide whether to use Western or Arabic-Indic digits and apply that choice everywhere. Format dates and currency for the locale and show validation messages in the active language.

A testing checklist

  1. 1Switch language on every page and confirm you land on the equivalent page.
  2. 2Check every breakpoint in RTL, including menus, sliders and modals.
  3. 3Validate hreflang with the Search Console reports.
  4. 4Search for your brand and key terms in both languages and review the snippets.
  5. 5Run accessibility checks: contrast, focus order and screen-reader language switching.

Go deeper with our technical SEO checklist and Arabic UI design guidelines.

We build bilingual products as standard, and this website is an example. If you need a bilingual platform, see web development and UI/UX design, or talk to us.

Frequently asked questions

Should I use subdomains, folders or separate domains for each language?

Folders on a single domain, such as /en and /ar, are usually the simplest to maintain and concentrate ranking signals on one domain.

Does Google treat Arabic pages differently?

No special treatment is needed beyond correct lang, hreflang, canonical tags and well-written Arabic content. Search behaviour and keywords differ, so research them separately.

Do I need a dedicated Arabic font?

Yes. Fonts designed for Arabic improve readability and avoid mismatched system fallbacks.

Can I use machine translation for Arabic pages?

It is risky. Machine-translated Arabic often reads unnaturally and misses search intent. Use native Arabic writing, or at least expert review.

Have a question we have not covered?

Ask the team directly. We are happy to talk through your situation.