Hreflang Validator

Check your page’s <link rel="alternate" hreflang="..."> and optional header Link: <...>; rel="alternate". Detect invalid language/region codes, duplicates, relative URLs, missing x-default, and (optionally) return tags.

What Is a Hreflang Validator?

The Hreflang Validator scans your page for <link rel="alternate" hreflang="xx-YY"> tags and optional Link HTTP header directives. It validates language–region codes, detects duplicates, checks for x-default, flags relative URLs, and can sample whether return tags exist across alternates.

Hreflang tags help search engines serve the correct language or regional URL to users in international markets, reducing duplicate content issues and improving user experience.

Why Hreflang Matters

Common Hreflang Issues

Best Practices for Hreflang Implementation

Example of Correct Hreflang Markup

<link rel="alternate" hreflang="en-US" href="https://example.com/us/page/" />
<link rel="alternate" hreflang="es-ES" href="https://example.com/es/page/" />
<link rel="alternate" hreflang="x-default" href="https://example.com/" />

FAQ: Hreflang Validator

What is a hreflang return tag?

A return tag means that if Page A references Page B with hreflang, then Page B must also reference Page A. Google requires this reciprocity.

Do I need x-default?

Yes, it’s recommended for global or language selector pages. It tells Google what to serve when no exact language/region match exists.

Can hreflang fix duplicate content?

Yes. By signaling which version to show to which audience, Google avoids showing multiple language versions in the same SERP.

What happens if hreflang is wrong?

Invalid codes, broken links, or missing return tags may cause Google to ignore the tags completely, leading to duplicate or misaligned rankings.

Pro tip: Keep language codes lowercase (e.g., en) and regions uppercase (e.g., GB). Always use absolute URLs and ensure every alternate page includes a return link to every other.