web validator

Canonical & hreflang Validator

Validate canonical and hreflang tags to avoid duplicate-content and localization issues.

Results

Processing…
Status
Processing...
Details
Processing...
Missing/invalid
Processing...
Invalid URLs
Processing...
Duplicate hreflang
Processing...

Rules & checks

Canonical tag must be present with a valid absolute URL.

hreflang tags must include language codes (e.g., en, en-us) and valid URLs.

Flags duplicate hreflang codes and invalid URLs.

When to use it

  • QA international pages before release
  • Check CMS templates for correct canonical/hreflang output
  • Validate static site exports or localized landing pages

Tips

  • Use absolute URLs for all canonical and hreflang href values
  • Avoid mixing uppercase/lowercase hreflang codes

Examples

Valid set

  • <link rel="canonical" href="https://example.com/" />
  • <link rel="alternate" hreflang="en" href="https://example.com/" />
  • <link rel="alternate" hreflang="es" href="https://example.com/es/" />

Missing canonical

  • No canonical tag -> flagged as missing

Duplicate hreflang

  • Two hreflang="en" entries -> flagged duplicate

FAQs

Do you check language-region correctness?
Basic pattern validation (e.g., en or en-us). For full locale validation, apply your locale list in code.
Do you fetch pages?
No. Validation is structural and stays client-side.

Related validators

Structure and presence check only; does not assess page content or indexing status.