2

I'm building an Angular app that supports English and Japanese.

  • The main site: domain.com, is displaying in Japanese.
  • The other one: domain.com/en, is displaying in English.

There's a logic that detect first visit to domain.com and redirect the user to the right page based on user browser language.

There's a Phantom-based pre-render server running behind it for SEO purpose.

hreflang tags and sitemap are configured properly.

When I search the domain using Google in English, it shows me the right result in English, the first result is domain.com/en.

But for some reason, when I search using Google in Japanese, the first result is domain.com (which is correct). But the title and description are in English. The interesting part is when I check the cache version of the site (there's a little triangle icon next to the domain, clicking it will be able to see the cache version of the site), it's in the correct language.

I have no idea why it behaves like that.

1

The following might be the factors why Google showed you the English version of the website:

  1. Browser Language - if you have set the default language of your browser to EN, most likely, Google will show you the English version of the site
  2. Location of your IP - despite the fact that you use the Google.jp, if Google detects your local IP is not in Japan, you will still be served with the English version.
  3. Cache version of the site - Google puts cookies in every search (especially when logged in, even in incognito mode).

so, why not try the following:

  1. clean your browsing history; use a premium VPN (if you are not physically in Japan); or
  2. ask a friend/colleague in Japan to do the manual search
  3. try different browser (set the default language to JP)
0

If you redirect away from the Japanese site for English users, Google won't be able to crawl it. Googlebot almost always gets detected as "English".

Redirecting users for language doesn't work very well. Language detection is often wrong. It usually relies on either identifying the country of the IP address of the user, or relies on the Accept-Language HTTP header. Both are problematic:

  • Geo IP databases are wrong an insignificant amount of the time (up to 10%)
  • Many users don't set up the Accept-Language header. It defaults to the language of the browser that is being used. It is especially problematic for non-English speakers who often get the English browser installed by default. They may speak enough English to get by, but it isn't their preferred language.
  • Travelers
  • Proxy servers
  • Borrowed computers
  • Crawlers and bots

I would recommend putting the Japanese site at example.com/jp. You would then never have to redirect between the two. They would each have distinct and clear URLs.

If it looks like a user is on a page where you suspect that they don't understand the language, you should put a prominent notice on the page in what you think is their preferred language. It should invite them to switch to the site in their language. Don't automatically try to take them there. Language detection just isn't good enough for that.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.