SEO & AI Search

Hreflang Arabic English: the right tags for UAE and Saudi sites, with a generator

The hreflang codes, x-default and return links an Arabic and English site needs in the UAE and Saudi Arabia, the mistakes Google quietly ignores, and a generator and checker.

By Youssef HeshamPublished 9 min read
Hreflang Arabic English: three lines on every page (ar, en and x-default), ar-AE for the UAE rather than ar-UAE, and ar-SA for Saudi Arabia because sa is Sanskrit

Hreflang Arabic English tags tell Google that two pages are the same content in two languages, so it can show Arabic searchers the Arabic page and everyone else the English one. Each version lists itself and every other version with a full URL: ar, en and, if you want one, x-default. For a page meant for one country, add the country after a hyphen, ar-AE for the UAE or ar-SA for Saudi Arabia; ar-UAE, ar-KSA and sa don’t do that job. The generator below writes the tags or sitemap entries for your pages, and the checker reads tags you paste and flags the mistakes Google skips without telling you.

  • Codes: a language from ISO 639-1 (ar, en), then optionally a hyphen and a country from ISO 3166-1 alpha-2 (AE, SA). A country on its own isn’t allowed, and upper or lower case makes no difference.
  • Every version lists every version, itself included, and the links must go both ways. An Arabic and English pair with an x-default carries 3 lines on each page.
  • Full URLs only, with https:// and the domain. A path such as /ar/services/ on its own doesn’t count.
  • One method is enough: link tags in the page head, an HTTP header, or the XML sitemap. Google treats the three the same.
  • UK, EU and UN do nothing as countries: Google ignores that part and keeps the language. UAE and KSA aren’t country codes either; AE and SA are.

Hreflang Arabic English generator and checker

Choose Generate tags, start from Arabic and English or the set with UAE and Saudi pages, replace the example URLs with one page of your site in each language, and pick link tags, sitemap entries or an HTTP header. To check a live page, choose Check my tags and paste its <link rel="alternate"> lines from the page source (Ctrl+U), or your sitemap entries, with the page’s URL. Nothing you paste leaves your browser.

Interactive tool

hreflang generator and checker for Arabic and English sites, with UAE and Saudi versions

What do you want to do?

An example site: replace the URLs with your pages.

For visitors whose language matches none of your versions: usually the English page or a language chooser. Leave empty for none.

Write it as

Your hreflang set

Language versions
2
x-default not counted
Lines on every page
3
identical on each version
Lines across the set
6
2 pages × 3 lines
Problems to fix
0
Google skips what it can’t read, without a warning
<link rel="alternate" hreflang="ar" href="https://www.example.com/ar/services/" />
<link rel="alternate" hreflang="en" href="https://www.example.com/en/services/" />
<link rel="alternate" hreflang="x-default" href="https://www.example.com/en/services/" />

Put the same lines in the <head> of every page listed, the page itself included.

Clean set: valid codes, full URLs, one URL per code. Add the same lines to every version and Google can pair them.

How this works

A code is a language from ISO 639-1 (ar, en), optionally a hyphen and a country from ISO 3166-1 alpha-2 (AE, SA). A country alone isn’t allowed, case doesn’t matter, and x-default marks the page for everyone else. The lists come from the IANA language subtag registry: 184 language codes and the 249 assigned country codes.

When the country part isn’t a valid code (UAE, KSA, UK, EU), Google ignores that part and keeps the language, so the line still counts, for the wrong audience. Two-letter codes such as ae, sa and uk are languages (Avestan, Sanskrit, Ukrainian), not countries.

Every version must list itself and all the others, with full URLs, and the links must go both ways. HTML tags, HTTP headers and the sitemap are equivalent for Google: use one. The generator percent-encodes Arabic paths and escapes & in the sitemap, as the sitemap protocol requires.

The checker reads one page’s tags at a time (or a whole sitemap, where it also checks return links). It can’t fetch the other pages: paste their tags too.

Google Search Central (localized versions, duplicate URLs, multi-regional sites), the IANA language subtag registry and sitemaps.org, checked 29 October 2026.

How hreflang works on an Arabic and English site

hreflang labels a link between equivalent pages. It doesn’t tell Google what language a page is in: Google works that out from the visible text and doesn’t use the lang attribute for it. What hreflang adds is the pairing: this Arabic services page and that English one are the same page for two audiences.

Three rules decide whether Google can use the pairing:

  1. Every version lists the whole set. The Arabic page lists the Arabic page and the English page; the English page lists the same two. If there is an x-default, every page lists it as well.
  2. Links go both ways. If the Arabic page doesn’t point back at the English one, Google may ignore the pair. Google calls these return links.
  3. URLs are complete: https://, the domain and the path.
MethodWhere it goesSuits
HTML link tagsThe <head> of every versionMost sites, whether the tags come from a theme, a plugin or your own code
XML sitemap<xhtml:link> lines inside each <url> entryLarge sites, or when you can’t edit the page head
HTTP headerA Link: header sent with the filePDFs and other files that have no head

Google treats the three the same; using two only adds upkeep, so pick one. Link tags must sit inside a well-formed <head>: an image or iframe that a chat widget or tracking script inserts above them ends the head early, and the lines after it land in the body. If in doubt, Google suggests an HTML validator.

Language and country codes for the UAE and Saudi Arabia

Codes are where most Gulf sites go wrong, because the obvious abbreviation is often somebody else’s code. The language always comes first and has two letters; the country, if you add one, follows a hyphen and also has two.

You meanWriteNotWhy
Arabic, any countryarara, arbGoogle uses the two-letter ISO 639-1 codes
Arabic for the UAEar-AEar-UAE, aeUAE isn’t an ISO country code, and ae is the code for Avestan
Arabic for Saudi Arabiaar-SAar-KSA, saKSA isn’t a code, and sa is Sanskrit
English for the UAEen-AEen-UAECountries take their two-letter codes
British Englishen-GB, or just enen-UKGoogle ignores UK; the United Kingdom’s code is GB
Arabic for Kuwait or Omanar-KW, ar-OMkw, omkw is Cornish and om is Oromo
Arabic, copied from a locale listar or ar-AEar-AR, ar_AEAR is Argentina, and tags use a hyphen, not an underscore
Everyone elsex-defaultdefault, en-defaultx-default is the only fallback value

Do you need countries at all? Only when the pages differ. If one Arabic page serves the whole Gulf, ar is right and reaches Arabic searchers everywhere. Add ar-AE and ar-SA when prices, delivery areas, phone numbers or legal terms really change; Google reads such local details as country signals too. If you do split by country, keep a plain ar and en as well: Google suggests a catch-all page for speakers of the language in countries you haven’t listed, such as Kuwait, Qatar or Egypt.

Worked example: 3 lines on each page, or 7

The generator’s example is one services page in two languages on example.com, with x-default pointing at the English version. Each of the two pages carries the same three lines:

<link rel="alternate" hreflang="ar" href="https://www.example.com/ar/services/" />
<link rel="alternate" hreflang="en" href="https://www.example.com/en/services/" />
<link rel="alternate" hreflang="x-default" href="https://www.example.com/en/services/" />

That is 6 lines across the pair, or 2 <url> entries with 3 <xhtml:link> lines each in a sitemap. Choose the UAE and Saudi example and the set grows to six versions (ar-AE, en-AE, ar-SA, en-SA and the catch-alls ar and en) plus x-default: 7 lines on each of 6 pages, 42 in all, for one page of content.

Every version carries the whole set, so the lines grow with the square of the versions.
Set-upVersionsLines on each pagePagesLines across the set
Arabic + English, with x-default2326
UAE + Saudi, no catch-alls, x-default on the en-AE page45420
UAE + Saudi + ar and en, with x-default67642

For 200 pages of content, the last set-up means 1,200 URLs and 8,400 lines, which is why sites with country versions usually keep hreflang in the sitemap. One sitemap holds at most 50,000 URLs or 50 MB uncompressed; past either, split it and list the parts in a sitemap index.

Switch to Check my tags for the opposite case: an Arabic UAE services page with ar-UAE, en-UK, sa for Saudi Arabic, a relative URL and a canonical pointing at the English page. Only 1 of its 5 hreflang lines, the x-default, is right as written, and the checker finds 6 problems: four in the lines, en-UK and en both reading as en with different URLs, and the canonical in the other language.

Common hreflang mistakes on Gulf sites

  1. Invented country codes. ar-UAE, en-UAE, ar-KSA and en-UK look right but miss. Google ignores a country code it doesn’t support, such as UK, and keeps the language, so at best the line counts as plain Arabic or English.
  2. Country codes used as languages. hreflang="ae" labels the page as Avestan and hreflang="sa" as Sanskrit. Google gives the same warning about be, which is Belarusian, not Belgium.
  3. Every language pointing at the home page. Themes that copy the language switcher send every English page to /ar/. A services page’s Arabic alternate is the Arabic services page.
  4. Missing return links or self-references. Common when the Arabic site runs on another platform or plugin, or only one template was updated. Both pages carry the identical set.
  5. A canonical in the other language. If the Arabic page’s canonical points at the English page, you tell Google the Arabic page is a copy of the English one. Google’s guidance is a canonical in the same language, normally the page itself.
  6. Relative URLs. /ar/services/ and //www.example.com/ar/services/ aren’t accepted. Write the full https:// address.
  7. Switching language by IP or browser setting. Google advises against it: Googlebot usually crawls from the US without an Accept-Language header, so it may never see the Arabic version. Link the versions and let visitors choose.

Related checks for a bilingual site: make sure crawlers can reach both /en/ and /ar/ with the AI crawler checker, and preview titles in both scripts with the Arabic meta title and description length tool. The address and phone number on your Google Business Profile are country signals too. Planning a new bilingual site? The guide to website design cost in Saudi Arabia covers what a second language adds.

hreflang rules checked on 29 October 2026 in Google Search Central and the IANA language subtag registry. We update this page when Google changes its guidance.

Bilingual sites that rank in both languages

We build and fix Arabic and English sites for the UAE and Saudi Arabia: hreflang, canonicals, sitemaps and the content each language needs to rank. See SEO & AI Search, or send us your site for a check.

Questions and answers

What is the hreflang code for Arabic?

ar, the ISO 639-1 code. Add a country after a hyphen only when the page is meant for one country: ar-AE for the UAE, ar-SA for Saudi Arabia.

Is it ar-AE or ar-UAE?

ar-AE. Countries use the two-letter ISO 3166-1 codes, and UAE isn’t one. Google ignores country codes it doesn’t support, so ar-UAE at best works as plain ar.

Do I need x-default?

No, it is optional. It tells Google which page to show people whose language matches none of your versions; on an Arabic and English site that is usually the English page or a language chooser.

Should the Arabic page have its own canonical?

Yes. Each language version is normally its own canonical. Google says that when you use hreflang, the canonical should be a page in the same language.

Can I put hreflang in the sitemap instead of the page?

Yes. Google treats link tags, HTTP headers and sitemap entries the same. In the sitemap, each <url> entry lists every version, itself included, and the file declares the xhtml namespace.

Does hreflang tell Google my page is in Arabic?

No. Google detects a page’s language from its visible content and doesn’t use the lang attribute for that. hreflang tells it which pages are versions of each other.

Sources

Adnova’s SEO and AI search team fixes the technical side, writes the content and builds the signals that get a brand found and cited.

Topics

  • Technical SEO
  • UAE
  • Saudi Arabia

Share this post

Written by

Youssef Hesham

Talk to us

Leave your email and someone from the team will get in touch. One message, from a person, no mailing list.

This form can’t be sent from this browser. Please email us at neveen@adnovamarketing.com.

All posts