Home › Blog

hreflang for Arabic Websites: Setup, Examples and Common Mistakes

Aya Saleh · November 8, 2026 · 6 min read

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?

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

SituationCode
One Arabic page for all countriesar
Arabic page for Saudi Arabiaar-SA
Arabic page for the UAEar-AE
Arabic page for Egyptar-EG
English page for all countriesen
Fallback for everyone elsex-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

Common hreflang mistakes on Arabic sites

  1. No return link. The English page points to the Arabic page, but the Arabic page does not point back.
  2. Invalid codes, such as ar-UAE or ar-KSA. The correct codes are ar-AE and ar-SA.
  3. Pointing every Arabic page to the Arabic homepage. Each page must point to its own translation.
  4. Canonical tags that cancel hreflang. Every version should have a self-referencing canonical, not a canonical to the English page.
  5. Translations that are not real equivalents. If the Arabic page covers a different topic, it is not an alternate version.
  6. 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

  1. View the source of an English page and its Arabic version, and confirm each lists the other and itself.
  2. Crawl the site with a tool such as Screaming Frog to find missing return links across all pages.
  3. 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