Hreflang Tag Validator

Hreflang Tag Validator

Check if your website's hreflang implementation is correct

Checking hreflang tags...

Validation Results

Detected Hreflang Tags

Language/RegionURLStatusIssues

About Hreflang Tag Validator

What is Hreflang?

Hreflang is an HTML attribute used to specify the language and geographical targeting of a webpage. It helps search engines understand which version of a page they should show to users in different locations or speaking different languages.

Correctly implemented hreflang tags are crucial for multilingual and international websites to avoid duplicate content issues and ensure users are directed to the most appropriate version of your content.

<link rel="alternate" hreflang="en-us" href="https://example.com/en-us/" /> <link rel="alternate" hreflang="en-gb" href="https://example.com/en-gb/" /> <link rel="alternate" hreflang="es" href="https://example.com/es/" />

How This Tool Works

Our Hreflang Tag Validator performs a comprehensive check of your website's hreflang implementation by:

  1. Fetching the HTML content of the specified URL
  2. Extracting all hreflang tags from the HTML head section
  3. Checking for common implementation errors and issues
  4. Verifying that all URLs in the hreflang set properly reference each other (return tag validation)
  5. Providing a detailed report of any issues found

How to Use This Tool

Using the Hreflang Tag Validator is simple:

  1. Enter the full URL of the page you want to check (including https://)
  2. Click "Validate Hreflang Tags"
  3. Wait for the tool to analyze your page
  4. Review the detailed results and fix any issues identified

Common Hreflang Issues

The validator checks for these common hreflang implementation problems:

  • Missing self-reference: Each page should reference itself with its own hreflang tag
  • Invalid hreflang values: Language and region codes must follow the ISO standards
  • Missing return tags: All pages in a hreflang set must reference each other
  • Conflicting hreflang declarations: Inconsistent declarations between pages
  • Incorrect formatting: Syntax errors in the hreflang implementation

Frequently Asked Questions

What format should I use for hreflang values?

Hreflang values should follow ISO standards: ISO 639-1 for language codes (like "en", "es", "de") and ISO 3166-1 Alpha-2 for country codes (like "us", "gb", "ca"). They're combined with a hyphen, for example: "en-us" for English in the United States.

Do I need a self-referencing hreflang tag?

Yes, every page should include a self-referencing hreflang tag. This means that if you have English, Spanish, and German versions of a page, each version should include hreflang tags pointing to all three versions, including itself.

Where should I place hreflang tags?

Hreflang tags can be implemented in three ways: in the HTML head as link elements, in the HTTP header, or in your XML sitemap. This tool validates hreflang tags in the HTML head section.

What does "x-default" mean in hreflang?

The "x-default" hreflang attribute is used to specify a fallback page when none of the other language/region versions match the user's browser settings. It's typically used for language selector pages or to specify a default version of your content.

How many hreflang tags can I have on a page?

There's no technical limit to the number of hreflang tags you can include, but you should only include tags that are relevant to your site structure. Each language/region version should have its own tag.

Can I use hreflang for pages with the same language but different content?

No, hreflang is specifically for pages that have the same content but in different languages or targeted at different regions. It's not intended for pages with completely different content.