Free tool

hreflang Tag Generator for Arabic and English Pages

This hreflang tag generator creates the language tags for Arabic and English versions of a page, as HTML link tags or XML sitemap entries.

Free tool

hreflang tag generator for Arabic and English sites

Create hreflang link tags and the XML sitemap version for ar, en, ar-SA, ar-JO, x-default and more.

Language versions of the same page

How to use it

How to generate hreflang tags

01
List every version

Add one row per language or country version of the same page, with its full URL.

02
Set x-default

Choose the page for users whose language or country is not listed, usually the main version.

03
Pick one method

Use the link tags in the page head, or the XML block in your sitemap. One method is enough; do not mix them with different values.

04
Repeat on every version

Each listed page must carry the full set, including a tag pointing to itself. Missing return tags are ignored by Google.

For SEO

What hreflang does on a bilingual site

An hreflang tag generator writes the tags that tell Google which language and country each version of a page targets. On a site with Arabic and English pages, hreflang helps Google show the Arabic page to Arabic searchers and the English page to English searchers, instead of letting the two versions compete. It does not merge ranking signals and it does not fix duplicate content on its own.

Choosing codes

CodeTargetsWhen to use it
arArabic speakers in any countryOne Arabic version for the whole region
ar-SAArabic speakers in Saudi ArabiaA version with Saudi prices, delivery or content
ar-JOArabic speakers in JordanA version made for the Jordanian market
enEnglish speakers in any countryOne English version
x-defaultEveryone elseMain page or language chooser

The language code comes first and the country code second. "sa-AR" is wrong, "ar-SA" is right. Use regional codes only if the content really differs between countries.

Most problems we see on Arabic and English sites come from missing return tags, hreflang pointing to redirected URLs, and canonical tags that point all versions to the English page. Our guide to hreflang for Arabic and English sites covers these, and canonical issues explains the canonical side. A real example of a bilingual setup is our Qatar waste management company case study.

Avoid these

Common hreflang mistakes

No return tags

If the Arabic page points to the English page but not the other way, Google ignores the pair.

Canonical to the other language

Each version must have a self-referencing canonical, not a canonical to the English page.

Redirected or 404 URLs

Every URL in the set must return 200 and be indexable.

Wrong code order

Language then country: ar-SA, en-AE. Country codes alone, such as "sa", are invalid.

Translated page with the same text

If the Arabic URL still shows English text, hreflang cannot help.

Plugins fighting

Translation plugins and SEO plugins can both output hreflang. Keep one source.

Next step

Fix the bilingual setup of your site

Language structure is a core part of our technical SEO and WordPress SEO work for sites with WPML, Polylang and custom setups. Also try the robots.txt generator and the other free SEO tools.

Not sure if Google sees your Arabic and English pages correctly? We will check hreflang, canonicals and indexing.

Get a free SEO audit

FAQ

Frequently asked questions

Should I use ar or ar-SA?

Use ar when one Arabic version serves all countries. Use ar-SA, ar-JO or another regional code only when the content differs by country, such as prices, delivery or local services.

What is x-default?

It tells Google which page to show users whose language or country does not match any listed version. It is usually the main version or a language chooser page.

Do I need hreflang in both the HTML and the sitemap?

No. One method is enough. The sitemap method is easier on large sites. If you use both, the values must match exactly.

Why does Google ignore my hreflang tags?

The most common reasons are missing return tags, URLs that redirect or return errors, and canonical tags pointing to another language version.

Does hreflang help rankings?

It helps Google show the right version to the right user. It does not add ranking strength, but it reduces cases where the wrong language ranks or both compete.

Want to know what is holding your site back?

Send us your website and get a free SEO audit with the first fixes to make.