hreflang for Arabic Websites: Setup, Examples and Common Mistakes
If your site has English and Arabic versions, or different Arabic pages for Egypt, Saudi Arabia and the UAE, hreflang tells Google which version to show to which searcher. Without it, Arabic users can land on the English page, or a Saudi user can see prices meant for Egypt. This guide shows how to set it up correctly on Arabic sites.
When does an Arabic site need hreflang?
- English and Arabic versions of the same pages. This is the most common case.
- Different Arabic pages per country, for example different prices, delivery areas or products for Egypt, Saudi Arabia and the UAE.
If you only have one Arabic version and no other language, you do not need hreflang. Set lang="ar" and dir="rtl" on the page instead. Those attributes help browsers and screen readers, but they are not a replacement for hreflang between language versions.
Choosing the right codes
| Situation | Code |
|---|---|
| One Arabic page for all countries | ar |
| Arabic page for Saudi Arabia | ar-SA |
| Arabic page for the UAE | ar-AE |
| Arabic page for Egypt | ar-EG |
| English page for all countries | en |
| Fallback for everyone else | x-default |
Use country codes only when the content really changes by country. If the Saudi and UAE pages are identical, one ar page is cleaner and avoids duplicate content.
Example 1: English and Arabic site
This is the setup on this site. The same three lines go in the head of both versions:
<link rel="alternate" hreflang="en" href="https://example.com/services/" /> <link rel="alternate" hreflang="ar" href="https://example.com/ar/services/" /> <link rel="alternate" hreflang="x-default" href="https://example.com/services/" />
Example 2: Arabic pages for different Gulf markets
<link rel="alternate" hreflang="ar-SA" href="https://example.com/sa/" /> <link rel="alternate" hreflang="ar-AE" href="https://example.com/ae/" /> <link rel="alternate" hreflang="en" href="https://example.com/" /> <link rel="alternate" hreflang="x-default" href="https://example.com/" />
You do not have to write these by hand: the free hreflang generator builds both the HTML tags and the XML sitemap version, and flags common errors.
URL structure for Arabic versions
- Subfolder, such as
/ar/, is usually the best choice. It keeps all the site's strength on one domain and is easy to manage. - Subdomain, such as
ar.example.com, works, but it is managed and measured more like a separate site. - Country domains, such as
.saor.ae, send the strongest local signal, but each one builds authority from zero.
Common hreflang mistakes on Arabic sites
- No return link. The English page points to the Arabic page, but the Arabic page does not point back.
- Invalid codes, such as
ar-UAEorar-KSA. The correct codes arear-AEandar-SA. - Pointing every Arabic page to the Arabic homepage. Each page must point to its own translation.
- Canonical tags that cancel hreflang. Every version should have a self-referencing canonical, not a canonical to the English page.
- Translations that are not real equivalents. If the Arabic page covers a different topic, it is not an alternate version.
- Pointing to redirects or noindex pages. Every hreflang URL should return 200 and be indexable.
hreflang on WordPress and Shopify
On WordPress, multilingual plugins such as WPML or Polylang add hreflang automatically when pages are linked as translations, so the main job is to check that every page has its pair. On Shopify, Markets and the translation settings add hreflang for each language and market. In both cases, check the page source of a few pages after setup, because one missing pair is enough to break the set.
How to check your hreflang
- View the source of an English page and its Arabic version, and confirm each lists the other and itself.
- Crawl the site with a tool such as Screaming Frog to find missing return links across all pages.
- Search in Arabic from the target country and confirm Google shows the Arabic version.
FAQ
Is hreflang a ranking factor?
No. It does not raise rankings by itself. It helps Google show the right version to the right user, which protects clicks and avoids duplicate content between language versions.
Should I use ar or ar-SA?
Use ar when one Arabic page serves every country. Use ar-SA, ar-AE or ar-EG only when you have separate pages for those markets.
Do I still need lang and dir attributes?
Yes. lang="ar" and dir="rtl" tell browsers how to display and read the page. hreflang tells search engines how the language versions relate to each other.
Read more in SEO in Arabic: a practical guide, or see my technical SEO service for help with multilingual setups.
More articles
SEO in Arabic: A Practical Guide for Arabic Websites
Arabic keyword research, dialect vs MSA, RTL and hreflang setup, Arabic fonts and AI Overviews.
Arabic SEOArabic Keyword Research: How to Find What Arabic Searchers Actually Type
Dialect words by market, spelling variants, Search Console mining and mapping keywords to pages.
Content architectureKeyword Cannibalization Audit: A Step-by-Step Process
The exact process behind a 93-URL audit for a New York clinic, from finding conflicts to rolling out 40 fixes.