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

For language URLs, should the default language gets its own subdirectory or take the document root?

· 52CE 我爱测

I'm new in the i18n world, searching online the best structure to deploy my i18n website, I've found two solutions with the subdirectory model: Every language in /locale_code Default language in / and others in /locale_code Is th…

问题原文

原帖链接 · alexHX12 · CC BY-SA 4.0

I'm new in the i18n world, searching online the best structure to deploy my i18n website, I've found two solutions with the subdirectory model:

  • Every language in /locale_code
  • Default language in / and others in /locale_code

Is there was any difference for SEO (i18n targeting, crawling rate, etc?) Which would be the best approach?

已采纳解答

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

Either way can work fine for SEO. There is going to be no difference in crawl rate. Targeting can be done either way with hreflang. I have a site with great SEO with English at the root of the domain but subdomains for every other language. Wikipedia (which also has great SEO) uses a language subdomain for every language including English.

Advantages to every language in a subdirectory

  • Easier to construct hreflang, XML sitemaps, and language switchers because there is no special case for one of the languages.
  • Users don't feel slighted that their language isn't the most important one.
  • No possibility of conflict between page URLs and language subdirectory names.
  • Ability to do language aware redirects from the document root. (Note you never want to automatically redirect from one language to another, but it can be good user experience to redirect to the appropriate language when a user lands on the home page and there is no page there for a specific language.)

Advantages to one language at the root

  • No need to change URLs for the original language when internationalizing a site that was originally single language.
  • Cleaner URLs for that one language.

For more information about structuring international URLs see How should I structure my URLs for both SEO and localization?

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

资料来源与适用范围

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

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

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