Link

alternate

Points to another representation of the current page, such as a translation, feed, or version made for different media.

Code examples

Good example
<link rel="alternate" hreflang="en-US" href="https://example.com/en-us/">
Identifies the US English version with a valid language tag.
Avoid this example
<link rel="alternate" hreflang="en_US" href="https://example.com/en-us/">
Uses an underscore, so en_US is not a valid BCP 47 language tag. Use en-US.

Recommendations

  • 01
    Use valid language tags
    For translated pages, set hreflang to a valid BCP 47 language tag such as en-US. Each URL should also identify itself and the other language versions.
  • 02
    Describe the alternate
    Use hreflang for language variants, type for feeds, or media for versions designed for particular media conditions.

Related documentation