How hreflang works
Google's page on localized versions, last updated on 21 September 2026 and read by us on 23 October 2026, explains that hreflang tells Google which pages are language or regional versions of the same content, so it can send each searcher to the right one. It is worth doing when the whole page is translated, when one language has small regional differences such as prices in dirhams or riyals, or when only the menus are translated. Google accepts three methods, HTML tags, HTTP headers and sitemaps, and treats them as equal; using all three brings no benefit and is harder to maintain, so pick one. Google also says it does not use hreflang or the lang attribute to detect a page's language. Each version must list itself and every other version, with fully-qualified URLs that may sit on different domains. If two pages do not point to each other, the tags are ignored, which stops another site from claiming to be a version of yours.
Language and region codes that are valid
An hreflang value is a language code in ISO 639-1, optionally followed by a dash and a region code in ISO 3166-1 alpha-2, such as en, ar, ar-AE or en-GB. A script code from ISO 15924 can sit in between, as in zh-Hant. A region on its own is not valid, and codes outside those lists, such as es-419, are not supported. Case does not matter, but writing the region in capitals is the ISO convention, so the tool writes ar-AE. Google says the reserved codes EU, UN and UK have no effect: for the United Kingdom use GB. For Arabic in the Gulf use ar-AE for the UAE, ar-SA for Saudi Arabia, ar-QA for Qatar, ar-KW for Kuwait, ar-OM for Oman and ar-BH for Bahrain, or plain ar for every Arabic speaker. Watch the traps: on their own, ae is the code for Avestan, sa for Sanskrit, kw for Cornish and om for Oromo, and ar-AR means Arabic for Argentina. The tool checks 183 language codes from the Library of Congress list and 249 region codes from the Debian iso-codes reprint of ISO 3166-1, because iso.org refused our connection.
x-default: the page for everyone else
x-default is a reserved value for visitors whose browser language matches none of your versions. Google recommends it for this fallback and says it was designed for language picker pages, where it works best, though any page can be used; it needs no language code. A common choice on a bilingual Gulf site is the English version or a page that lets visitors pick English or Arabic. The same x-default should appear in the set on every version, and the checker warns when pages name different ones. If you have regional pages for one language, such as en-GB and en-US, Google also suggests a plain en page for speakers of that language elsewhere, and the generator reminds you when it is missing.
Three formats: which one to choose
HTML tags suit most sites: every version carries the same block of link rel="alternate" tags inside its head, including one for itself. Google asks that the tags sit in a well-formed head section and that hreflang is not combined with other attributes such as media in the same tag. The HTTP Link header carries the same set in a response header and is the way to annotate PDFs and other files that have no HTML head. The sitemap method keeps everything in one file: each URL gets its own url entry, and each entry lists every version, itself included, as xhtml:link elements, with the xhtml namespace declared on the urlset. Those child links do not count toward the sitemap's URL limit, and a sitemap may only list URLs below the folder it is served from. The Bulk tab turns a spreadsheet of pages, one column per language, into such a sitemap in one step.
What the return-link checker looks for
The checker reads the pages you paste, or a sitemap, and builds a table of every hreflang link with its status. It never fetches pages, so copy each version's source from your browser, put a line with its URL above it, and paste them all. Errors stop Google from using the tags; warnings are likely mistakes. It also writes a corrected, complete set from the codes each page gives itself. To give AI assistants a short map of the site as well, build one with the llms.txt generator; for the title and description of each language version, use the meta tag generator. More checks are in our free SEO tools.
- Missing return links: page A lists page B, but B does not list A
- A version that does not list itself, and the same code used for two URLs
- A page that calls itself ar-AE while another page calls it ar
- Tags in the body instead of the head, and hreflang combined with media or type
- A canonical pointing to another URL or another language: Google asks for a canonical in the same language
- Relative, protocol-relative and http:// URLs, #fragments and tracking parameters
- Invalid codes, en-UK, es-419, country codes used as languages, and pages that name different x-default URLs