Using code like this in the HTML head:
<link rel="alternate" hreflang="en-US” href="https://mywebsite.com" />
<link rel="alternate" hreflang="fr” href="https://mywebsite.com/fr" />
<link rel="alternate" hreflang="zh-Hans” href="https://mywebsite.com/cn" />
According to Google's SEO docs the hreflang attribute should be in one of these three possible formats:
- Language code. Example: zh
- Language and region codes. Example: zh-TW
- Language and script codes. Example: zh-Hant
Using codes from these three lists: