SEO & Google

Bilingual Websites for Egypt and the Gulf: hreflang and URL Structure Done Right

How to structure an Arabic and English website for Egypt and the Gulf: URL options, language versus country targeting, correct hreflang with return links and x-default, translated metadata, and why automatic redirects backfire.

Illustration of two linked website pages, one in Arabic and one in English, with hreflang arrows between Egypt, Saudi Arabia and UAE flags on a map

An Egyptian company selling to clients in Cairo, Riyadh and Dubai usually needs a website in both Arabic and English. The design part is familiar: a language switcher and a right-to-left layout. The search part is where many bilingual sites go wrong. Google shows the English page to Arabic searchers, both versions compete with each other, or the Arabic pages are never indexed at all.

The short answer: give each language its own URL (for example /ar/ and /en/), keep one language per page, and connect each page to its translation with hreflang annotations that point in both directions and include each page itself. Add an x-default for visitors whose language you do not target, never auto-redirect visitors based on IP or browser language, and translate titles, descriptions and structured data, not just body text. Use country-specific versions (such as Arabic for Saudi Arabia) only when the content is genuinely different.

This guide explains each decision with Google's official documentation, and gives you a checklist for Egypt and Gulf targeting.

Key takeaways

  • Google recommends separate URLs per language; subdirectories such as example.com/ar/ are the simplest option for most companies.
  • hreflang tells Google which page is the equivalent in another language or region. Each version must list itself and all others, or the tags may be ignored.
  • Language codes use ISO 639-1 (ar, en), optionally followed by an ISO 3166-1 region code (ar-EG, ar-SA). A country code on its own is not valid.
  • Google does not use hreflang or the HTML lang attribute to detect a page's language. The content itself must be in that language.
  • Do not automatically redirect users to a language version. Let them choose, and remember the choice.

Step 1: Choose the URL structure

Google's guide to managing multi-regional and multilingual sites describes four options:

StructureExampleProsCons
Country-code domainsexample.com.eg, example.saClear country targetingExpensive, more infrastructure, one country per domain
Subdomainsar.example.comEasy setup, flexible hostingUsers may not read "ar" as a language
Subdirectoriesexample.com/ar/Easy to set up, low maintenance, one hostLess separation between sites
URL parametersexample.com?lang=ar-Not recommended by Google

For most Egyptian companies, subdirectories are the practical choice: one domain, one hosting setup, and all the authority the domain has built is shared by both languages. Country-code domains make sense only for large brands running separate operations in each country.

Avoid switching language on the same URL

Some sites change language with a button that swaps text in the browser while the URL stays the same. Google then sees only one language, usually the default. Each language version needs its own crawlable URL.

Step 2: Decide between language targeting and country targeting

You rarely need a separate Arabic version for every Gulf country. Ask whether the content actually differs:

  • Same Arabic content for Egypt and the Gulf: use one Arabic version tagged ar. It serves Arabic speakers everywhere.
  • Different prices, currencies, legal terms or services by country: create regional versions, such as ar-EG for Egypt and ar-SA for Saudi Arabia, and make the content genuinely different: prices in EGP versus SAR, local contact numbers, local regulations (Egypt's ETA versus Saudi ZATCA for e-invoicing, for example).

Google's documentation says the language code follows ISO 639-1 and may be followed by a region code in ISO 3166-1 Alpha 2 format, separated by a dash. It also warns: "You can't specify the country code by itself." A tag like hreflang="sa" is therefore wrong. Google would read "sa" as a language code (Sanskrit), not as Saudi Arabia.

When regional versions look almost identical

Google's canonicalization guide says different language versions are considered duplicates only if the primary content is in the same language. If your ar-EG and ar-SA pages are nearly the same, Google may treat them as duplicates and choose one. For same-language regional variants, it recommends using hreflang together with canonical tags. Better still, only split regions when the content really differs.

Step 3: Implement hreflang correctly

According to Google's page on telling Google about localized versions, you can declare alternates in three equivalent ways: HTML link tags in the page head, HTTP headers, or an XML sitemap. Pick one method and use it consistently.

Example for a service page in two languages

Both the English and the Arabic page carry the same set of annotations:

  • <link rel="alternate" hreflang="en" href="https://example.com/en/erp-system" />
  • <link rel="alternate" hreflang="ar" href="https://example.com/ar/نظام-erp" />
  • <link rel="alternate" hreflang="x-default" href="https://example.com/en/erp-system" />

The rules that break most setups

  1. Return links are required. Google states that each language version must list itself as well as all other versions, and if two pages don't both point to each other, the tags will be ignored.
  2. Use full URLs, including https and the domain.
  3. Point to the equivalent page, not the other language's home page.
  4. Point to indexable, canonical URLs that return 200, not redirects or pages marked noindex.
  5. Use x-default for the fallback page shown when no language matches the user's settings, often the English version or a language selector.
  6. Keep annotations in sync when pages are added, renamed or deleted. On sites with many pages, generating hreflang from the database or sitemap avoids manual errors.

When the sitemap method is easier

If your pages are generated from a database, such as articles, products or service pages, declaring alternates in the XML sitemap keeps the page code lighter and puts all language pairs in one place. Each URL entry lists every language version, including itself, using xhtml:link elements. Whichever method you choose, test a sample of pairs after every major release.

Step 4: Make the content itself clearly one language

Google says it does not use hreflang or the HTML lang attribute to detect a page's language; it uses algorithms on the content. So:

  • Keep one language per page, including navigation, buttons, footer and form labels. Google advises against side-by-side translations on a page.
  • Translate the title, meta description, headings, image alt text and URL slug where possible.
  • Translate structured data values, such as service names and descriptions, so they match the visible text on that page.
  • Still set lang="ar" and dir="rtl" on Arabic pages. Google does not use them for language detection, but browsers, screen readers and other tools do.

Step 5: Language switching without automatic redirects

It is tempting to send visitors from Saudi IP addresses to the Arabic site automatically. Google's guidance says to avoid automatically redirecting users from one language version to another, and notes that IP location analysis is generally not reliable. Google's crawlers also do not try to detect geographic variations, so redirects based on location can stop them from seeing some of your versions.

  • Show a visible language switcher on every page, linking to the equivalent page, not the home page.
  • You may show a small, dismissible suggestion ("هذه الصفحة متاحة بالعربية") based on browser language.
  • Remember the user's choice in a cookie or local storage.

Bilingual SEO checklist for Egypt and the Gulf

  1. Each language has its own URL path, crawlable without JavaScript tricks.
  2. One language per page, including navigation and footer.
  3. Reciprocal hreflang on every page, including self-reference and x-default.
  4. Region codes used only where content truly differs by country.
  5. Titles, descriptions, headings, alt text and structured data translated.
  6. Arabic pages right-to-left with correct lang and dir.
  7. No automatic redirects by IP; a clear language switcher instead.
  8. The XML sitemap includes both language versions.
  9. Search Console checked for indexing of both versions.

Common errors on Egyptian bilingual sites

  • hreflang only on the home page, not on inner pages.
  • The Arabic page's hreflang points to the English home page instead of the equivalent page.
  • Arabic pages with English titles and descriptions, because metadata was never translated.
  • Arabic versions that are partial, with half the text still in English.
  • Using a country code alone, such as hreflang="eg" or hreflang="sa", instead of ar-EG or ar-SA.

For how Arabic searchers phrase their queries, see our guide to Arabic SEO.

How Nilex helps

Nilex builds bilingual SEO business websites with separate Arabic and English URLs, hreflang generated automatically from the content database, translated metadata and structured data, and right-to-left layouts designed from the start. It is the same setup we use on our own site.

Frequently asked questions

What is hreflang and do I need it?

hreflang is an annotation that tells Google which pages are equivalent versions in other languages or regions. If your site has Arabic and English versions of the same pages, you should use it so Google shows each searcher the right version.

Is a subfolder or a subdomain better for the Arabic version?

Both are acceptable to Google. A subfolder such as /ar/ is easier to set up and maintain on one host, which is why most companies choose it.

Do I need a separate Arabic version for Saudi Arabia and the UAE?

Only if the content differs, for example prices, currency, contact details or regulations. If the Arabic content is the same, one version tagged "ar" serves Arabic speakers in Egypt and the Gulf.

Should I redirect visitors to Arabic automatically?

Google advises against automatic redirects between language versions. Offer a clear switcher and, at most, a dismissible suggestion based on browser language.

How do I check that my hreflang works?

Inspect a few pages' source to confirm reciprocal annotations with full URLs, check that every URL returns 200 and is indexable, and use Search Console to confirm both language versions are indexed and receive impressions.

Serve every market in its own language

A correct bilingual setup lets one website serve Egypt and the Gulf without its languages competing. Book a free consultation with Nilex to review your language structure and hreflang, or to plan a bilingual site from the start.

LET'S BUILD

YOUR VISION.
OUR TECHNOLOGY.

Tell us what your business needs. We'll build the system around it.

START A CONVERSATION →

or email us at info@nilexdigitalsystems.com