WPCheck a site

Link your languages with hreflang

If your site has several languages, hreflang tells search engines that the pages are versions of each other, so visitors land on theirs.

Steps

About an hour

All guides

  1. /fr/
  2. /en/
  3. x-default
  1. Give each language its own address, such as /fr/ and /en/.
  2. On every page, list all its language versions, including itself, plus an x-default for everyone else.
  3. Make the links work both ways, and use the final address of each page, not one that redirects.
  4. Set the lang attribute on the html tag of each page to match its language.
Example
<link rel="alternate" hreflang="fr" href="https://example.com/fr/">
<link rel="alternate" hreflang="en" href="https://example.com/en/">
<link rel="alternate" hreflang="x-default" href="https://example.com/fr/">
Read the guideMake your pages faster on phones