Hreflang for Arabic and English sites: a practical setup guide

Reading Time: 8 min
18
techkahwa.net | 30 December 2025

If your site has an Arabic article and an English version of the same article, Google needs a clear signal that the two pages belong together. Hreflang is that signal, and the rule that trips up most bilingual sites is simple: every language version must list itself and every other version, and the links must go both ways.

What hreflang does, and when you need it

Hreflang annotations tell Google that page A and page B are language or regional versions of each other, so it can show the more suitable one.

You need hreflang when you have real equivalents: a translated article, or a regional page aimed at a different market in the same language. You do not need it for an Arabic page that has no English counterpart.

Two points from Google’s documentation shape everything else in this guide.

First, hreflang does not tell Google what language a page is in. Google states that it does not use hreflang or the HTML lang attribute to detect a page’s language; it uses algorithms, and elsewhere it explains that it reads the visible content. So a page whose body is mostly English will not be treated as Arabic because of a tag.

Second, the translation must be real. Google warns that translating only the boilerplate, such as menus and footers, while the bulk of the content stays in one language can create a bad user experience. An “Arabic version” that is an English article inside an RTL template is not an Arabic version.

Hreflang pairs pages. It is not a ranking boost, and I would be wary of anyone who sells it as one.

Setting it up step by step

  1. Pick a URL pattern and keep it. Folders (example.com/ar/ and example.com/en/), subdomains (ar.example.com) or separate domains all work with hreflang. For most blogs, folders are the easiest to manage.
  2. Choose your codes. The language code uses ISO 639-1 format, and you can add an optional region in ISO 3166-1 Alpha 2 format. That gives you ar, en, and regional forms such as ar-SA or ar-EG. Use plain ar unless you truly publish different pages for different Arab countries, for example separate prices or delivery terms for Saudi Arabia and Egypt.
  3. Choose one method. Google supports three: HTML link tags in the page head, HTTP headers, or your XML sitemap. HTML tags suit most CMS setups, HTTP headers suit non-HTML files such as PDFs, and the sitemap suits large sites. Pick one, so you have a single place to fix mistakes.
  4. Add self-reference and return links. On each version, list that page itself plus every other language version. Google is explicit: if page X links to page Y, page Y must link back to page X, otherwise the annotations may be ignored or misread.
  5. Decide on x-default. Google reserves the x-default value for cases where no other language or region matches the user’s browser setting. It fits a language picker page, or a homepage that serves a global audience.
  6. Do not auto-redirect by language. Google advises against automatically redirecting users from one language version to another. Instead, place a visible language switch link on every page (“English” on Arabic pages, “العربية” on English ones) so readers and crawlers can reach both.
  7. Point only at final URLs. Every hreflang URL should return the page itself, not a redirect, and be indexable, with the same protocol and trailing slash as your canonical URLs.
  8. Verify. Use the URL Inspection tool in Search Console to confirm that both versions are indexed, and run a site crawler that reports hreflang to catch missing return links.
  9. Maintain it. When you delete a translation, remove its hreflang entries from the remaining versions at the same time.

A worked Arabic and English example

Suppose you publish a coffee guide in both languages. The Arabic URL uses an Arabic slug, so in the href it is percent encoded, which is how Google’s URL guidance shows non-ASCII characters in links. The English page is at /en/coffee-guide. Both pages carry the same block in their head:

<link rel="alternate" hreflang="ar" href="https://example.com/ar/%D8%AF%D9%84%D9%8A%D9%84-%D8%A7%D9%84%D9%82%D9%87%D9%88%D8%A9" />
<link rel="alternate" hreflang="en" href="https://example.com/en/coffee-guide" />
<link rel="alternate" hreflang="x-default" href="https://example.com/en/coffee-guide" />

The first line decodes to /ar/دليل-القهوة. Both pages list themselves and each other. Here the English version doubles as x-default because it is the page I would show a visitor whose browser language is neither Arabic nor English. You could point it at a language picker instead.

The same pairing in a sitemap looks like this:

<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml">
  <url>
    <loc>https://example.com/ar/%D8%AF%D9%84%D9%8A%D9%84-%D8%A7%D9%84%D9%82%D9%87%D9%88%D8%A9</loc>
    <xhtml:link rel="alternate" hreflang="ar" href="https://example.com/ar/%D8%AF%D9%84%D9%8A%D9%84-%D8%A7%D9%84%D9%82%D9%87%D9%88%D8%A9" />
    <xhtml:link rel="alternate" hreflang="en" href="https://example.com/en/coffee-guide" />
  </url>
  <url>
    <loc>https://example.com/en/coffee-guide</loc>
    <xhtml:link rel="alternate" hreflang="ar" href="https://example.com/ar/%D8%AF%D9%84%D9%8A%D9%84-%D8%A7%D9%84%D9%82%D9%87%D9%88%D8%A9" />
    <xhtml:link rel="alternate" hreflang="en" href="https://example.com/en/coffee-guide" />
  </url>
</urlset>

Each url entry repeats the full set, which is the self-reference rule in sitemap form. If you use x-default, add that line to both entries too. Use this or the HTML tags, not both.

Hreflang checklist

Check How Tool
Every version lists itself View source on each language version Browser view source
Return links exist both ways Crawl the site and review hreflang reports Site crawler
Codes are valid Language in ISO 639-1, optional region in ISO 3166-1 Alpha 2 Manual review
Only one method in use Confirm tags are not duplicated in head, headers and sitemap View source and sitemap file
Targets are final, indexable URLs Inspect each hreflang URL for redirects or noindex Search Console URL Inspection
No automatic language redirects Visit with a different browser language and confirm no forced redirect Browser settings
Visible language switcher Confirm a link to the other version on every page Manual review
Content is fully translated Read the body, not just menus and footer Manual review

Common mistakes

  • Missing return links. The English page points to the Arabic one, but the Arabic template never outputs the tag back. Google says one-way annotations may be ignored.
  • Invalid codes. ar-UAE is wrong because the region part must be a two-letter ISO 3166-1 code, so it should be ar-AE. Writing a country code on its own, such as sa for Saudi Arabia, is also wrong, because the first part is always read as a language code.
  • Redirecting by IP or browser language. Google advises against automatic language redirects. Let people choose.
  • Translating only the chrome. A translated menu around untranslated text is exactly the boilerplate problem.
  • Expecting a ranking lift. Hreflang helps Google show the right version. It does not make either version rank higher.

Sources

  • Google Search Central, documentation on telling Google about localized versions of your page (hreflang), consulted 30 December 2025, https://developers.google.com/search/docs/specialty/international/localized-versions
  • Google Search Central, documentation on managing multi-regional and multilingual sites, consulted 30 December 2025, https://developers.google.com/search/docs/specialty/international/managing-multi-regional-sites
  • Google Search Central, URL structure best practices (percent encoding of non-ASCII characters in links), consulted 30 December 2025, https://developers.google.com/search/docs/crawling-indexing/url-structure