大网数据广告活动
网站运营与故障问答

Redirect visitors to equivalent pages for a multilingual site without effecting SEO?

· 52CE 我爱测

I have 5 language on my website example.com (main page on English) example.com/esp (Spanish) example.com/ger (Germany) example.com/ru (Russia) example.com/it (Italy) What the best way to redirect users from one language to anothe…

问题原文

原帖链接 · imba Agency · CC BY-SA 4.0

I have 5 language on my website

  • example.com (main page on English)
  • example.com/esp (Spanish)
  • example.com/ger (Germany)
  • example.com/ru (Russia)
  • example.com/it (Italy)

What the best way to redirect users from one language to another? The system of my website determines the language of the browser and redirects visitors. But if I use 301 redirect its very bad for SEO (domain gluing or cloaking). I need good solution for SEO and Users.

p.s. From google docs. 302 redirect is for temporary solutions. 301 for permanent. respectively, neither 301 nor 302 is suitable. What are other options?

已采纳解答

原帖链接 · Stephen Ostermiller · CC BY-SA 4.0

You shouldn't redirect. You say "The system of my website determines the language of the browser", but you need to look into that more. It is not as reliable as you think. It is certainly not reliable enough to redirect.

There are two ways to determine the language of the user:

  • Use the Accept-Language header which usually comes with a language and country, and a list of languages like fr-CH, fr;q=0.9, en;q=0.8, de;q=0.7, *;q=0.5.
  • Use the IP address to get an idea of where the user is so that you know what language they speak there.

Neither of these is right all the time. In fact they are both wrong for up to 10% of users.

Accept-language limitations

Most users don't know how to set up their browser to send their language preferences properly. They tend to us the default settings that come with their browser. This is especially problematic for non-English speaking users. Browsers often default to English because they are developed by English speakers. Users may know just enough English to get by with English UI, but would much prefer their native language.

There are also cases where a user is borrowing a computer from a friend, or using an internet cafe. The header is going to be just plain wrong in these cases.

In some cases, a browser or a bot may not send the Accept-Language header at all. There are cases in which you will get no information about which language is preferred from this method.

Geo-IP identification limitations

Databases that find a users location based on IP address are inaccurate. They get the user in the wrong location (maybe even the wrong country) some of the time.

There is also the issue that knowing the users location doesn't necessarily indicate the language spoken. Some places speak more than one language. For example parts of Canada speak both English and French. People also travel. Just because you are in France, it doesn't mean that you speak the language. You may just be visiting.

What do do instead

Instead of redirecting, it is better to put a prominent notice on the page. For example when the Accept-Language header indicates than the user has a 90% affinity for English (en;q=0.9) you could put a notice written in English on pages in any other language:

This page is currently in French, but it looks like you would prefer the English version of this page.

View the English Version

That way there is no SEO issue with redirects and users can still read the language they land on if the language identification is incorrect.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Webmasters Stack Exchange
适用范围
以原帖系统、软件版本与发布日期为准(2019-11-08)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。