外向け Sotomuke

← Guides · About 7 min · Updated 2026-10-14

What Is hreflang? How to Correctly Tell Google About Language Versions on a Multilingual Site (with Examples)

hreflang is an attribute that tells search engines about the language and regional versions of pages with the same content. Using the example of adding English, Chinese, and Korean versions to a Japanese site, we explain how to write it, what x-default means, how it relates to canonical, how to specify it in a sitemap, and common mistakes.

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/">

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 annotationsWriting hreflang only on the Japanese page and not on the English page. Without reciprocal references, the annotations are ignored.
Incorrect language codesjp (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 originalThe translated page is treated as a duplicate and disappears from search results.
Pointing to untranslated pagesPointing 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 JavaScriptCrawlers 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.

Create a free preview View pricing

Related Guides

English