FiveNodes
Let's talk
← Back to blog

Digital Marketing

Arabic and English Website Structure: hreflang and RTL

Our existing Arabic SEO guide for Saudi Arabia covers keyword research and why native writing matters. This article is the technical companion: how to structure an Arabic and English website so that search engines understand the relationship between pages, and so that the Arabic version actually works on a phone. It is for owners commissioning a bilingual site and for developers who have been handed one. The examples are standard patterns that we describe from Google's published documentation; before you ship, test them on your own staging site, because CMS themes and plugins often rewrite markup.

Decision 1: URL structure

There are three common patterns. All can work; the right choice is the one you can keep consistent.

  • Subdirectories on one domain: example.com/ar/ for Arabic and example.com/ for English. One domain accumulates authority, hosting is simple, and reporting is combined. This is the pattern we default to for small and mid-size business sites.
  • Subdomains: ar.example.com. Useful if a separate team or platform runs the Arabic site, but you manage it as a separate property in Search Console.
  • Country domains: example.ae, example.sa. Only worth it when you really run separate businesses per country, with separate legal and content needs.

Whichever you choose, mirror the structure: /services/seo/ in English should have a matching /ar/services/seo/ page. Keep Arabic slugs either in Latin letters (simple, predictable) or in Arabic script, but be consistent. If you use Arabic script URLs, test that links survive when copied into WhatsApp, where encoded URLs can look long.

Decision 2: One language per page

Do not mix both languages in one page body, and do not use automatic browser-language redirects as the only way to reach a version. Visitors and crawlers should always be able to reach each version by a stable URL. If you offer a language switcher, make it a normal link to the matching page, not a script that reloads the home page.

hreflang: the rules that matter

Google's documentation on localized versions of pages sets out the rules we use:

  1. Pages must reference each other (reciprocal links). If page A points to page B but B does not point back, the tags are ignored.
  2. Each version must include itself in its own set of annotations, and every version lists the same complete set.
  3. URLs must be fully qualified, including the protocol, such as https://example.com/ar/services/seo/.
  4. The language code comes first (ISO 639-1), with an optional region code (ISO 3166-1 Alpha 2). You cannot specify a country by itself.
  5. Use x-default for a fallback page, such as a language selector, for users who do not match any listed version.
  6. You can implement annotations in HTML link tags, HTTP headers, or the XML sitemap. Google says they are equivalent, so pick one method and do not mix methods.

A correct pair of English and Arabic pages, in the head of each page, would list three annotations: hreflang="en" pointing to the English URL, hreflang="ar" pointing to the Arabic URL, and hreflang="x-default" pointing to the English URL (or your selector). The English page and the Arabic page carry the same three lines.

Language only, or language plus region?

If you have one Arabic version for the whole Gulf, ar alone is enough. If you genuinely publish different Arabic pages for Saudi Arabia and the UAE (different offers, phone numbers, legal text), use ar-SA and ar-AE, and keep a generic ar as a catch-all, as Google advises for same-language regional versions. Do not create regional copies that differ only by a city name; that is thin content, not localisation.

Common hreflang mistakes

  • Pointing every Arabic page to the English home page.
  • Forgetting the self-reference.
  • Using ar-GCC or en-GCC; those are not valid region codes.
  • Annotating pages that redirect, return an error, or are blocked from crawling.
  • Translating one page but linking hreflang to a different page type.
  • Canonical tags that point the Arabic page at the English page, which tells Google to ignore the Arabic one. Each version's canonical should be itself.

Page-level language and direction

  • Set lang="ar" and dir="rtl" on the html element of Arabic pages, and lang="en" on English ones.
  • If an Arabic page contains an English product name or phone number, wrap it in an element with the right lang and, for numbers, direction, so that punctuation does not jump to the wrong side.
  • Translate the title tag, meta description, alt text, button labels, form errors and structured data, not just body copy.
  • Set the Open Graph locale for each version.

RTL layout pitfalls we check for

  1. Physical CSS properties. Rules written with margin-left or float: left do not flip. Use logical properties such as margin-inline-start and text-align: start.
  2. Icons with direction. Arrows, back buttons, progress bars and carousels need mirroring; logos, phone icons and clocks usually do not.
  3. Letter spacing. Letter-spacing breaks Arabic joined letters. Reset it to normal on Arabic text.
  4. Fonts. A Latin-only font falls back to an inconsistent system font. Choose an Arabic-capable family, check weights, and test on Android as well as iPhone.
  5. Line height. Arabic script usually needs more line height than Latin text of the same size.
  6. Forms. Phone and email fields should stay left-to-right inside an RTL form. Validation messages need translations. Country code selectors should list +971, +966 and +974 first for a Gulf audience if that matches your customers.
  7. Numerals. Decide on Western (0-9) or Eastern Arabic numerals, and use one style. Prices and phone numbers in Western digits are widely readable; confirm with a native reviewer for your audience.
  8. Sliders and tables. Test scroll direction and column order.
  9. Floating widgets. A WhatsApp button on the bottom-right of an English page often belongs bottom-left on RTL layouts; make sure it does not cover the primary buttons or cause layout shift.

Sitemaps, internal links and navigation

  • List both language versions in the XML sitemap, with hreflang if you use the sitemap method.
  • Link Arabic pages to other Arabic pages, not back to English ones, except through the language switcher.
  • Translate breadcrumbs and footer links, and ensure they point to Arabic URLs.
  • Use separate Search Console reporting (or filters on the /ar/ path) to see Arabic queries.

Content decisions: dialect, Modern Standard Arabic and tone

Most business sites use clear Modern Standard Arabic with local vocabulary where needed, and keep dialect for social channels. We recommend a native reviewer for each Gulf market you target, because phrases differ between Saudi, Emirati and Qatari audiences. Do not machine-translate whole pages and publish them unreviewed.

Launch checklist

  1. Every English page that matters has an Arabic counterpart, or no Arabic URL at all (do not publish empty shells).
  2. hreflang validated both ways on a sample of pages.
  3. Canonicals self-referencing.
  4. Arabic pages return a 200 status and are indexable.
  5. Mobile test on at least one iPhone and one Android device.
  6. Forms, WhatsApp links and maps links tested in Arabic.

Next steps

We build and audit bilingual sites remotely from our Lahore engineering hub, with an Albuquerque HQ address and no Gulf office. See our web design and development and SEO services, the Riyadh market page, and the UAE market overview. Request a free audit of your current setup or get in touch.

Get in touch

Like how we think? Let's build something together.

The same thinking that goes into our writing goes into every line of code we ship for clients.

Chat with AlexOur AI guide · free