Skip to main content

hreflang.

SEO SEO Fundamentals

Tells search engines which language version to show users in different countries

What does this check test?

This check verifies that multi-language and multi-region sites use `hreflang` annotations to indicate the relationship between pages in different languages or regional variants. Hreflang is specified via `<link rel="alternate" hreflang="xx">` tags in the `<head>`, HTTP headers, or in the XML sitemap. Every page in a language group must reference all other versions (including itself with `hreflang="x-default"` for the fallback). Mismatched or incomplete hreflang annotations — where page A references page B but page B does not reference page A — are treated as errors and ignored by Google.

Why does it matter?

Without hreflang, Google may show your English page to French users, your US pricing page to UK visitors, or index only one language version and ignore the others as duplicate content. Hreflang solves three problems: it ensures users see content in their language, it prevents duplicate content penalties between language variants (Google understands they are alternatives, not copies), and it consolidates ranking signals across all language versions rather than splitting them. For businesses targeting multiple markets, incorrect hreflang implementation can mean entire regional sites are effectively invisible in local search results.

Who is affected?

SEO specialists managing international search strategy, front-end developers building multi-language sites, i18n engineers implementing locale switching, CMS developers generating language-specific URLs, and DevOps engineers configuring CDN or server-level headers for language routing.

Where does this apply?

Every page that has a version in another language or for another region. This includes the homepage, all content pages, product pages, and legal pages across all language versions. The `x-default` hreflang should point to your language selector or default language version. Sites using subdirectories (`/en/`, `/fr/`), subdomains (`en.example.com`, `fr.example.com`), or separate TLDs (`.com`, `.fr`) all need hreflang.

How to fix it

Every referenced page must contain reciprocal references — if the English page links to the French version, the French version must link back to the English version. Use ISO 639-1 language codes and optionally ISO 3166-1 region codes: `en-US`, `en-GB`, `pt-BR`. Hreflang link tags (must appear on every language variant):
html
<head>
  <link rel="alternate" hreflang="en" href="https://example.com/en/about">
  <link rel="alternate" hreflang="fr" href="https://example.com/fr/about">
  <link rel="alternate" hreflang="x-default" href="https://example.com/about">
</head>
Next.js App Router alternates metadata:
ts
// app/[locale]/about/page.tsx
export const metadata = {
  alternates: {
    languages: {
      en: '/en/about',
      fr: '/fr/about',
    },
  },
};
For large sites, hreflang in the XML sitemap is more maintainable than HTML tags. Validate with Google Search Console's International Targeting report or the hreflang tag checker tool.

References

AppVet checks hreflang automatically

Run a free seo scan and get a full report with actionable fixes, including a Fix with AI prompt you can paste into any coding tool.

Run Audit