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

Should we localize URLs for default language or not?

· 52CE 我爱测

I have a website running in English and Japanese and the default language is Japanese. What are the advantages of one over the other solution: Solution 1. When accessing example.com , you will see only Japanese. When accessing ex…

问题原文

原帖链接 · Thịnh Phạm · CC BY-SA 3.0

I have a website running in English and Japanese and the default language is Japanese.

What are the advantages of one over the other solution:

  • Solution 1. When accessing example.com, you will see only Japanese. When accessing example.com/en, you will see only English.

  • Solution 2. When you access example.com, it will redirect you to example.com/ja, where you will see only Japanese. English site is still example.com/en.

已采纳解答

原帖链接 · unor · CC BY-SA 3.0

I think it’s better to include the language code for the default language, too. Quoting the pros from my answer on Stack Overflow:

  • If you decide to change the default language, you don’t have to change your URLs.
  • Consistency.
  • It allows you to redirect from / based on the visitor’s language preference.
  • It’s a signal that your site is available in multiple languages.
  • It’s easier for users that want to change the language from the URL.
  • It allows users of external search engines to search for pages in the default language only (site:example.com/en/; where site:example.com/ would find pages in all languages).

On the root page you could either provide links to both sites (similar to what Wikipedia does), redirect according to the visitor’s language settings (or based on IP), or redirect to the default language.

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

资料来源与适用范围

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

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

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