Skip to content
SEO

Hreflang for Arabic: The Exact Tags to Use

How to set hreflang for Arabic pages: which language and region codes to use, where the tags go, and the mistakes that break them most often.

By Jeremy ZavaAI-assisted, reviewed by Ibrahem Helal5 min read

Hreflang for Arabic pages uses the code ar alone for a general Arabic audience, or a region code such as ar-sa only when the page is genuinely built for that country, plus an x-default for everyone else. Each page must list every version, including itself, and the tags must be reciprocal in both directions.

This is one of the more mechanical pieces of Arabic SEO, and also one of the most commonly broken, because a single missing return link can quietly undo the whole setup.

On this page

What does hreflang actually do?

Hreflang tells Google that two or more pages are different-language versions of the same content, so it can show the right one to the right searcher instead of guessing from browser settings alone [1]. It's an annotation, not a redirect — visitors can still reach any version directly.

Without it, Google may show your English homepage to an Arabic searcher even when a perfectly good Arabic version exists, simply because it has no signal connecting the two pages. Hreflang is that signal.

It's worth being precise about what hreflang is not. It's not a ranking factor in the sense that adding it makes either page rank higher, and it's not a substitute for the Arabic page actually being good. What it changes is which version of a page a searcher sees for a given query, which matters enormously when you have two competent pages and the wrong one keeps showing up for Arabic-language searches.

That distinction trips up teams who add hreflang expecting a traffic increase and see nothing, because the tags were never going to create demand — they redirect existing demand to the right page. If your Arabic page wasn't getting found before, hreflang alone won't fix that; it fixes which of your own pages shows once someone is already searching in Arabic.

ar, ar-SA or ar-AE — which code do you use?

Match the code to how specific the page's content actually is, not to where your company happens to operate.

Hreflang codes for Arabic content
CodeUse it whenExample
arOne Arabic page serves every Arabic-speaking readerA general Arabic blog post or service page
ar-SAThe page has Saudi-specific pricing, offers or referencesA landing page built only for Saudi buyers
ar-AEThe page has UAE-specific contentA landing page built only for UAE buyers
x-defaultAny visitor whose language or region doesn't match a listed tagUsually your English homepage or a language chooser

Most bilingual sites only need ar plus x-default. Add a regional code only once you actually maintain a page whose content differs by country — pricing, currency, regulatory language — not as a default habit.

A common instinct is to add ar-sa because most of the traffic happens to come from Saudi Arabia, even though the page itself says nothing specific to that country. Resist it. A regional tag narrows Google's understanding of who the page is relevant for, and a general Arabic page tagged as Saudi-only can lose visibility with searchers elsewhere in the Arabic-speaking world for no real benefit.

The x-default tag deserves its own decision, not an automatic copy of your English page. If your site can reasonably guess a visitor's preferred language and redirect them, x-default should point at whatever a visitor sees before that guess resolves — often a simple language chooser rather than a full homepage in either language.

Where do the hreflang tags actually go?

Three places work, and they all send the same signal. Pick one method and use it consistently across the whole site.

  1. HTML head tags

    Add a <link rel="alternate" hreflang="..."> element for every language version inside the <head> of each page [4]. Simplest for a small site, but easy to miss on a template change.

  2. HTTP headers

    Send the same information as a Link header, useful for non-HTML resources like PDFs where you can't edit a <head>.

  3. XML sitemap entries

    List every language version's URL as an alternate inside one sitemap entry. Easier to maintain at scale, since one file covers every page.

Picking one method matters more than which one you pick. Mixing head tags on some pages with sitemap entries on others is how teams end up with two sources of truth that quietly drift apart after the next redesign, each one technically correct on its own and contradictory together.

For a site built on a modern framework, sitemap-based hreflang is usually the easier one to keep correct over time, because it lives in one generated file rather than scattered across every page template. For a smaller, mostly static site, head tags are simpler to reason about and easier for a non-developer to audit by viewing source.

The mistakes that break hreflang for Arabic sites most often

The second common mistake is a canonical tag on the Arabic page that points to its English twin. That tells Google the Arabic page is a duplicate rather than a distinct language version, and it can remove the whole Arabic section from results even while the hreflang tags themselves look correct [2].

The third is a region code applied out of habit — ar-sa on a page that isn't actually Saudi-specific — which needlessly narrows who Google considers it relevant for. When in doubt, use the plain ar tag.

A fourth, quieter mistake is listing a language version whose URL doesn't actually resolve — a page that was planned, tagged, and then never published, or one that moved without the hreflang tag being updated to match. A hreflang tag pointing at a broken URL doesn't just fail silently; it can make Google trust the whole cluster of tags less.

How do you test hreflang once it's live?

Fetch each page's raw HTML and confirm every listed language version resolves with a 200 status, that the tags are reciprocal, and that each URL is self-canonical. Google Search Console's International Targeting report surfaces some of these errors directly, including missing return tags and unresolved URLs.

Re-check after any template change or migration. Hreflang tags live in code that gets edited for unrelated reasons, and a redesign is the single most common moment a working setup quietly breaks.

Build the check into your actual release process rather than relying on remembering to do it. A short script that fetches every hreflang URL on a page and confirms it returns 200 and lists a matching return tag takes little effort to write once, and it catches a broken setup before it ships rather than weeks later when Arabic impressions quietly drop for reasons nobody connects back to the release.

How hreflang fits with the rest of your Arabic setup

Hreflang only helps if the page it points to is actually good. A visitor routed correctly to a broken right-to-left layout still leaves, so run the RTL website checklist on every page in your hreflang set before you rely on the tags to do their job.

The words on that page matter just as much. If your Arabic content is a straight translation of the English page rather than something built for how Arabic searchers actually phrase a query, see translation vs transcreation for how to decide which pages need a rewrite. Getting keywords right, as covered in Arabic keyword research tools, is what makes the hreflang setup worth having in the first place.

Questions people also ask

  • What hreflang code should I use for a general Arabic page?

    ar on its own, with no region code, when one Arabic page serves every Arabic-speaking country. Add a region such as ar-sa or ar-ae only when you have a genuinely different page built for that specific country.

  • Do I need an x-default tag?

    Yes, if you have visitors who don't match any of your listed language or region tags. x-default names the page to show them, usually your English homepage or a language chooser.

  • Does hreflang need a canonical tag that matches it?

    Each URL in a hreflang set should be self-canonical — canonical to itself, not to another language version. A canonical pointing at the English page tells Google the Arabic page is a duplicate, which quietly removes it from Arabic results.

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

    Yes, sitemap-based hreflang works the same way as head tags and is often easier to maintain at scale, since you update one file instead of every page template.

Sources

  1. Tell Google about localized versions of your page — Google Search Central (checked 23 September 2026)
  2. Managing multi-regional and multilingual sites — Google Search Central (checked 23 September 2026)
  3. Language tags in HTML and XML — W3C Internationalization (checked 23 September 2026)
  4. <link>: The External Resource Link element — MDN Web Docs (checked 23 September 2026)

Get your hreflang setup checked before your next migration

Book a free 30-minute consultation with Ibrahem and Jeremy. We look at your site while we talk, and you leave with a prioritised plan.

Who wrote this

Jeremy ZavaCo-founder

Leads growth and client partnerships.

Works on: CRO, SEO

Reviewed before publishing by Ibrahem Helal, Co-founder.

Posts by Jeremy Zava

More on this