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,EUandUNdo nothing as countries: Google ignores that part and keeps the language.UAEandKSAaren’t country codes either;AEandSAare.
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.
hreflang generator and checker for Arabic and English sites, with UAE and Saudi versions
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.
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:
- 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.
- 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.
- URLs are complete: https://, the domain and the path.
| Method | Where it goes | Suits |
|---|---|---|
| HTML link tags | The <head> of every version | Most sites, whether the tags come from a theme, a plugin or your own code |
| XML sitemap | <xhtml:link> lines inside each <url> entry | Large sites, or when you can’t edit the page head |
| HTTP header | A Link: header sent with the file | PDFs 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 mean | Write | Not | Why |
|---|---|---|---|
| Arabic, any country | ar | ara, arb | Google uses the two-letter ISO 639-1 codes |
| Arabic for the UAE | ar-AE | ar-UAE, ae | UAE isn’t an ISO country code, and ae is the code for Avestan |
| Arabic for Saudi Arabia | ar-SA | ar-KSA, sa | KSA isn’t a code, and sa is Sanskrit |
| English for the UAE | en-AE | en-UAE | Countries take their two-letter codes |
| British English | en-GB, or just en | en-UK | Google ignores UK; the United Kingdom’s code is GB |
| Arabic for Kuwait or Oman | ar-KW, ar-OM | kw, om | kw is Cornish and om is Oromo |
| Arabic, copied from a locale list | ar or ar-AE | ar-AR, ar_AE | AR is Argentina, and tags use a hyphen, not an underscore |
| Everyone else | x-default | default, en-default | x-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.
| Set-up | Versions | Lines on each page | Pages | Lines across the set |
|---|---|---|---|---|
| Arabic + English, with x-default | 2 | 3 | 2 | 6 |
| UAE + Saudi, no catch-alls, x-default on the en-AE page | 4 | 5 | 4 | 20 |
UAE + Saudi + ar and en, with x-default | 6 | 7 | 6 | 42 |
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
- Invented country codes.
ar-UAE,en-UAE,ar-KSAanden-UKlook 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. - Country codes used as languages.
hreflang="ae"labels the page as Avestan andhreflang="sa"as Sanskrit. Google gives the same warning aboutbe, which is Belarusian, not Belgium. - 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.
- 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.
- 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.
- Relative URLs.
/ar/services/and//www.example.com/ar/services/aren’t accepted. Write the full https:// address. - 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
- Tell Google about localized versions of your page, Google Search Central: methods, codes, x-default, return links, full URLs, ignored UK, EU and UN (updated 21 September 2026; checked 29 October 2026)
- Managing multi-regional and multilingual sites, Google Search Central: language detection, redirects, crawl location, country signals (checked 29 October 2026)
- How to specify a canonical URL, Google Search Central: a canonical in the same language when you use hreflang (checked 29 October 2026)
- The International Targeting report is deprecated, Search Console Help (checked 29 October 2026)
- Build and submit a sitemap, Google Search Central: 50,000 URLs or 50 MB per sitemap, absolute URLs (checked 29 October 2026)
- Sitemaps XML format, sitemaps.org: entity-escaping and percent-encoding URLs (checked 29 October 2026)
- Language Subtag Registry, IANA: language and country codes (file dated 17 September 2026; checked 29 October 2026)
- RFC 5646: Tags for Identifying Languages, IETF: hyphens between the parts of a tag (checked 29 October 2026)
- HTML Standard: the “in head” insertion mode, WHATWG: elements that don’t belong in the head end it (checked 29 October 2026)
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.



