A hreflang tag should point directly to the final address of a language version: a page that answers successfully without a redirect. If the address redirects, enter the target address. If the language version no longer exists, remove it from the set of hreflang tags on every page.

This guide covers the two findings the scanner reports when it fetches these addresses: the linked page does not answer successfully, or it redirects. Google's documentation does not say how Google treats such hreflang tags. What is certain: a page that does not answer cannot confirm the link back, and a hreflang tag with the final address leaves no room for doubt.

Linked language version is not reachable

Finding in the report: HREFLANG_TARGET_NON_200

What it means

A hreflang tag points to an address that does not answer with a page: it answers with an error such as 404 (not found) or 500 (server error), or it does not answer at all.

Such a page cannot link back, so the pair of language versions cannot be confirmed. Visitors who follow the address get an error instead of their language version.

The finding in the scan report names the address and the HTTP status code or the error.

Typical causes

  • The translation was deleted or unpublished, but the hreflang tag still points to it.
  • The address of the translation has changed, for example because its slug was edited, and the hreflang tag still uses the old address.
  • A typo in a hand-written address.
  • A temporary server problem, or a server that refuses automated requests.

How to check

  1. Open the address from the finding in your browser.
  2. If it shows an error, check in your CMS whether the translation exists and is published, and what its current address is.
  3. If it works in your browser, look at the status code or the error in the finding: a timeout or a refusal (403, 429) can mean that the server limits automated requests.

How to fix

  1. If the translation exists under another address, point the hreflang tag at that address. In a plugin, this usually means connecting the translations again.
  2. If the translation no longer exists, remove it from the set of hreflang tags on all pages.
  3. If it was a temporary problem, nothing has to be changed.

How to confirm the fix

  • Open the address again: it should show the page.
  • Scan again: the finding disappears from the report once the address answers successfully.

Linked language version redirects

Finding in the report: HREFLANG_TARGET_REDIRECT

What it means

A hreflang tag points to an address that redirects to another one, for example from http to https, from an old address to a new one, or from one language to another.

The scanner reports this as a warning: the language version can be reached, but the hreflang tag does not name its final address. A hreflang tag with the final address is the clearer signal.

The finding in the scan report names the address in the hreflang tag and the final address the redirect ends at.

Typical causes

  • The hreflang tag uses http, but the website redirects to https, or the address without www, while the website uses www, or the other way round.
  • A missing or extra slash at the end that the server corrects with a redirect.
  • An old address that redirects to the new one after a slug or the site structure was changed.
  • A redirect based on the visitor's browser language or location.

How to check

  1. Compare the address in the hreflang tag with the final address from the finding: what is different: http or https, www, the slash at the end, the path?
  2. If the final address is in another language, check whether the website redirects visitors by browser language or location.

How to fix

  1. Point the hreflang tag at the final address. With a plugin, check the website address in the settings of WordPress or your CMS, because the plugin builds the addresses from it.
  2. Do not redirect search engines by language or location. Googlebot usually crawls from addresses in the USA and without a language preference (the Accept-Language header), so a redirect of this kind can hide language versions from Google.

How to confirm the fix

  • Open the address from the hreflang tag: it should not redirect.
  • Scan again: the finding disappears from the report once the hreflang tag names the final address.

Setup in WordPress, Shopify & co.

WordPress + WPML

WPML's browser language redirect is off by default. If it is on (WPML → Settings → URLs and SEO), it redirects with JavaScript; according to WPML, search engines that do not follow JavaScript redirects stay on the address they were given.

WPML can rebuild a translation's slug every time its title changes. Every title change then creates a new address: WPML's own hreflang tags follow, but hand-written links or a cached sitemap may still point to the old one.

Sources: WPML: URLs, slugs and SEO (external link)

WordPress + Polylang

Polylang's detection of the browser language only redirects the home page, and only on the first visit; a cookie remembers the language for returning visitors. To switch off the redirect completely, Polylang says to deactivate the detection and to hide the language code of the default language in the addresses (Languages → Settings).

Sources: Polylang: detect the browser preferred language (external link)

Shopify

Shopify redirects customers to their market automatically, but not search engine crawlers, so that all market versions can be indexed.

Sources: Shopify Help: SEO for international markets (external link)

A website with its own code, or a simple site without a database

Build the addresses in the hreflang tags with the same function that builds the page's canonical address. Then http or https, www and the slash at the end always match the address the page is served at.

When an address changes, set up a redirect from the old one, and update the hreflang tags at the same time, so they name the new address directly.

Further reading