Reputation: 1
I am creating a corporate website for my company. Since the site is multilingual, the region and locale codes are included in the URL. region is currently fixed at global
, so the URL at the top of the site will look like https://example.com/global/{locale}
.
If the region and locale codes are omitted, as in https://example.com
, we redirect to the URL in English, the default language, as in https://example.com/global/en
.
The current problem is that when I search for a company in Google search, the search results are displayed in English, even though I am searching in Japanese.
To avoid this, I set hreflang on the top page of the site as follows.
<link rel="alternate" hreflang="en" href="https://example.com/global/en">
<link rel="alternate" hreflang="en" href="https://example.com/global/ja">
Other pages are described in the same way with the URL corresponding to that page. I was hoping that this would show up in Japanese for Japanese searches, but it still shows English as usual. What should I do in such a case?
Upvotes: 0
Views: 119
Reputation: 243
From what I understand
URL | Region Targeting | Language Targeting |
---|---|---|
https://example.com/global/en | global | English |
https://example.com/global/ja | global | Japanese |
In this case your hreflang should look like this on both of the pages
<link rel="alternate" hreflang="en" href="https://example.com/global/en">
<link rel="alternate" hreflang="ja" href="https://example.com/global/ja">
In addition you should specify the corresponding language on the HTML tag of the pages, either <html lang="en">
or <html lang="ja">
. All languages need to be valid ISO 639-1 language codes.
If at some point you want to have a more specific language and region targeting, you need to specify both, language and region:
URL | Region Targeting | Language Targeting |
---|---|---|
https://example.com/jp/en | Japan | English |
https://example.com/jp/ja | Japan | Japanese |
In this case your hreflang should look like this on both of the pages:
<link rel="alternate" hreflang="en-JP" href="https://example.com/jp/en">
<link rel="alternate" hreflang="ja-JP" href="https://example.com/jp/ja">
All country codes need to be ISO 3166-1. Of course the language set on the HTML tag should also match.
After correcting hreflang it can take quite some time for search engines to pick it up an honor it. To avoid any more mistakes and multiple iterations of error fixing, I suggest using an hreflang validator in form of a website crawler tool that crawls all your pages, extracts hreflang and language information, groups together the pages into hreflang groups and validates them afterwards. Tools that only follow hreflang links from a single URL provided are insufficient for this task, because they will not discover problems with additional pages belonging to the same group. An example for this would be a pagination page where the canonical link misses the pagination parameter.
Upvotes: 0