hreflang is an attribute that tells search engines, "This page has alternate versions for these languages (and regions)." When a Japanese company profile page has English and Chinese versions, Google looks at hreflang to show the English version to people searching in English and the Chinese version to people searching in Chinese. Even without it, each language page is indexed individually, but with it they are treated as "language variants of the same page," making the appropriate language version more likely to appear in search results and eliminating duplicate content concerns.
How to Write It (in the HTML head)
In each page's <head> , list all language versions, including the page itself. This example is for a Japanese site example.co.jp , serving English, Simplified Chinese, and Korean versions at global.example.co.jp .
<link rel="alternate" hreflang="ja" href="https://example.co.jp/company/">
<link rel="alternate" hreflang="en" href="https://global.example.co.jp/en/company/">
<link rel="alternate" hreflang="zh-Hans" href="https://global.example.co.jp/zh-Hans/company/">
<link rel="alternate" hreflang="ko" href="https://global.example.co.jp/ko/company/">
<link rel="alternate" hreflang="x-default" href="https://example.co.jp/company/">
- Language codes follow ISO 639-1 (
en、ja、ko). Chinese is commonly split by script: Simplified Chinese iszh-Hans, and Traditional Chinese iszh-Hant. To add a region, write it likeen-US、zh-TW. - x-default is "the page shown to visitors who don't match any language." If Japanese is the original, it is natural to specify the Japanese page. A language selection page is also fine if you have one.
- Mutual references are required. The English page must point to the Japanese page, and the Japanese page must point to the English page; otherwise, the tags are invalid.
- URLs must be absolute URLs pointing to pages that actually return 200. URLs that redirect or point to noindex pages are ignored.
How to Specify It in a Sitemap
If you can't edit the HTML, you can put the same information in an XML sitemap. For each URL, list every language version with xhtml:link .
<url>
<loc>https://global.example.co.jp/en/company/</loc>
<xhtml:link rel="alternate" hreflang="ja" href="https://example.co.jp/company/"/>
<xhtml:link rel="alternate" hreflang="en" href="https://global.example.co.jp/en/company/"/>
<xhtml:link rel="alternate" hreflang="ko" href="https://global.example.co.jp/ko/company/"/>
<xhtml:link rel="alternate" hreflang="x-default" href="https://example.co.jp/company/"/>
</url>
A sitemap is accepted even if it is hosted on a different host, as long as it is referenced from robots.txt.example.co.jp/robots.txt to Sitemap: https://global.example.co.jp/sitemap.xml This is the method of writing
Relationship with canonical
rel="canonical" is a declaration that "this is the official URL of this page," and each language page should set itself as its canonical. If you point the English page's canonical to the Japanese page, you are effectively saying "the English page is a duplicate of the Japanese page," and the English page will drop out of the index. Remember: hreflang links language versions to each other, while canonical determines the official URL within each language version.
Common mistakes
| One-way annotations | Writing hreflang only on the Japanese page and not on the English page. Without reciprocal references, the annotations are ignored. |
|---|---|
| Incorrect language codes | jp (the correct form is ja)、cn (the correct form is zh-Hans or zh-CN)、en-UK (the correct form is en-GB)。 |
| Pointing canonical to the original | The translated page is treated as a duplicate and disappears from search results. |
| Pointing to untranslated pages | Pointing to a URL with no English version using hreflang="en" causes an error. Only add it to pages that have language versions. |
| Inserting it later with JavaScript | Crawlers may read the page before rendering. Include it in the HTML returned by the server, or specify it in the sitemap. |
Checking your setup
Since the "International Targeting" report in Google Search Console has been retired, the reliable approach now is to use URL Inspection to check whether each language page is indexed. After a few weeks, viewing "Search performance" by country will show which language version is appearing in which country.
With Sotomuke
Translated pages served by Sotomuke automatically include language-specific URLs, a self-referencing canonical, hreflang for all language versions, and x-default on the server side, and the same information is included in the sitemap. If you can add hreflang to your original Japanese site, following the steps in Linking from your original site to translated pages lets you tell Google about the group, including the original pages.
Try it with Sotomuke
Just paste the URL of your Japanese website, and we'll create a free translated preview of your homepage. No CMS modifications or tag installation required. Publishing starts at ¥4,980 per month, with no minimum contract period.
