Hreflang tags without mistakes
Hreflang tags tell search engines which language or country version of a page to show. They only work when every version points to every other one. This guide uses Kitwise's own English and Arabic ERP pages as the example.
Free tools for this
1. A real example
The KitWise ERP home page exists in English (/erp/) and Arabic (/erp/ar/). Both pages carry the same three tags: en pointing to /erp/, ar pointing to /erp/ar/, and x-default pointing to /erp/.
2. The rules
- Return links. If page A lists page B, page B must list page A, or both tags are ignored.
- Self-reference. Each page lists itself too.
- Valid codes. Language in ISO 639-1 (en, ar, ur), optionally a region in ISO 3166-1 (en-GB, ar-AE). "uk" is Ukrainian, not the United Kingdom.
- Canonical agrees. Each version's canonical tag points to itself, not to the other language.
- x-default. Points to the page for everyone else, usually the language picker or the main version.
3. Where to put them
Either in the head of every version, or in the XML sitemap. Use one method, not both, so they cannot disagree.
4. When not to use hreflang
Only add it when real translated or regional versions exist. A single English site serving many countries needs no hreflang at all.
Questions
Does hreflang improve rankings?
It does not raise rankings; it helps the right language version appear for each searcher.
Do I need x-default?
It is recommended, so searchers in other languages land on a sensible page.
Can I use hreflang across different domains?
Yes, as long as every version links back.