Free Hreflang Tester Tool | OneStepToRank

Hreflang Tags Tester

Validate your hreflang implementation across HTML, HTTP headers, and XML sitemaps. Detect missing return tags, invalid language codes, and common errors.

Hreflang Tags Found

LanguageURLSource

Validation Results

Recommendations

Rank in Every Market

OneStepToRank monitors your local rankings across languages, regions, and competitors in real time.

Get Started Free

What Are Hreflang Tags?

Hreflang tags are HTML annotations that tell search engines which language and regional version of a page to serve to users. They use the rel="alternate" hreflang="xx" format and can be placed in three locations: HTML <link> tags in the <head>, HTTP Link response headers, or xhtml:link elements in XML sitemaps.

Correct hreflang implementation ensures Google shows the right language version to users in each market, preventing duplicate content issues across international sites.

Common Hreflang Mistakes

The most frequent errors include: missing self-referencing tags (every page must reference itself), missing return tags (if page A links to page B, page B must link back to A), using incorrect language codes (must be ISO 639-1), mixing relative and absolute URLs, and inconsistent protocol usage (mixing http and https).

Google will silently ignore hreflang annotations that contain errors, making it essential to validate your implementation with a tool like this one.

Hreflang in XML Sitemaps

For large sites with many language variants, implementing hreflang in XML sitemaps is often more manageable than HTML tags. Each <url> entry includes <xhtml:link> elements pointing to all alternate versions. Use our Sitemap Generator to create sitemaps with hreflang support.

Frequently Asked Questions

What are hreflang tags?

Hreflang tags tell search engines which language and regional version of a page to show users. They use the format hreflang="en-US" for English (United States) or hreflang="fr" for French. They can be placed in HTML link tags, HTTP headers, or XML sitemaps.

What is a self-referencing hreflang tag?

A self-referencing hreflang tag is when a page includes itself in the set of alternate versions. Google requires every page in an hreflang set to reference itself along with all other versions. Missing self-references is one of the most common implementation errors.

What is x-default in hreflang?

The x-default hreflang value designates the fallback page for users whose language or region does not match any specific hreflang tag. It is typically the homepage or a language selector page. While not strictly required, Google recommends including it.

Do hreflang tags need return links?

Yes. If page A has an hreflang tag pointing to page B, then page B must also have an hreflang tag pointing back to page A. This bidirectional confirmation is required by Google. Missing return tags cause Google to ignore the hreflang annotations entirely.