Blog

SEO4 min read

How to check hreflang on your multilingual site

hreflang tells Google which URL is the French, German or English version of a page. When it is wrong, Google may show the wrong language in search results, and nothing on the page itself looks broken.

This is how to check it in a few minutes. Every rule below comes from Google's page Tell Google about localized versions of your page (read 8 November 2026).

What correct looks like

For a page that exists in English and French, both versions carry the same block in their <head>:

html
<link rel="alternate" hreflang="en" href="https://example.com/pricing">
<link rel="alternate" hreflang="fr" href="https://example.com/fr/pricing">
<link rel="alternate" hreflang="x-default" href="https://example.com/pricing">

You can also send the same information in HTTP Link headers or in your sitemap. Google accepts all three methods; pick one and use it consistently.

The five checks

1

Every version lists itself and all the others

“Each language version must list itself as well as all other language versions.” Google Search Central

The English page needs an en line pointing to itself, not only lines for the other languages.

2

If the French page says the English page is its alternate, the English page must say the same about the French one. Google: "If it becomes difficult to maintain a complete set of bidirectional links for every language, you can omit some languages on some pages; Google will still process the ones that point to each other." Links that only point one way are the ones that get ignored.

3

URLs are complete

“Alternate URLs must be fully-qualified, including the transport method (http/https), so: https://example.com/foo, not //example.com/foo or /foo.” Google Search Central

Relative paths are an easy mistake to make in hand-written or generated tags.

4

Codes are valid

The language code is ISO 639-1 (fr, de, pt), optionally followed by an ISO 3166-1 Alpha 2 region (pt-BR). Google's page lists "Specifying the region alone is not valid" among common mistakes, so hreflang="uk" means Ukrainian, not the United Kingdom (that is en-GB).

5

There is a fallback for everyone else

x-default is the value "to match any language not explicitly listed by an hreflang tag on the page". Google recommends it especially for language selectors and auto-redirecting home pages. Point it at the version you want unmatched visitors to land on, usually your original language.

How to run the check

In the browser. Open a page, view source (not the inspector, which shows the page after JavaScript ran) and search for hreflang. If the tags only appear in the inspector, JavaScript adds them after load. Tags in the server HTML are seen by every crawler without rendering, so that is the safer place for them.

With curl, for the raw HTML and any Link header:

bash
curl -s https://example.com/fr/pricing | grep -i hreflang
curl -sI https://example.com/fr/pricing | grep -i '^link'

Then repeat on one of the URLs you found, and confirm it points back. Do this for the home page and for one deep page per language; template bugs tend to show up on deep pages.

Check the targets respond. Every href in the block should return 200 and not redirect. A quick loop:

bash
for u in https://example.com/pricing https://example.com/fr/pricing; do
  curl -s -o /dev/null -w "%{http_code} $u\n" "$u"
done

Ask your coding agent. If your site was built with Lovable, Bolt, v0 or Next.js, you can paste the five checks above and ask it to verify every page template. It can read the source directly, which is faster than crawling.

Things hreflang does not do

  • It does not translate anything or create the pages; it only connects pages that already exist.
  • Google says it does not use the HTML lang attribute to detect a page's language; it uses its own algorithms. Set lang correctly anyway for accessibility, but don't rely on it for search.
  • Pages that exist in only one language need no alternate links for other languages. A single-language page with an x-default pointing to itself is harmless.

Written by the Eachlang team. Corrections welcome at hello@eachlang.com. RSS feed.

Keep reading

Say hello
to more customers.

On WordPress, Shopify, Squarespace or any other site. Every language included, from $39 a month, and nothing grows unless you say so.

14-day trial, no card. Pro $39 a month with one site; Agency $99 with 10.

Say hello
to more customers.

On WordPress, Shopify, Squarespace or any other site. Every language included, from $39 a month, and nothing grows unless you say so.

14-day trial, no card. Pro $39 a month with one site; Agency $99 with 10.