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

Do you use the country or country and language for subdomains?

· 52CE 我爱测

We need to do translated pages where we have multiple countries that will be using the same language. The URLs will be based on the Subdomain option or Subdomains with gTLD . What is the correct subdomain pattern when you have mu…

问题原文

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

We need to do translated pages where we have multiple countries that will be using the same language. The URLs will be based on the Subdomain option or Subdomains with gTLD.

What is the correct subdomain pattern when you have multiple countries using the same language?

Example:

  • Language = en --> domain = www.example.com
  • Language = en-GB (United Kingdom) --> domain = en-gb.example.com (Is this correct?)
  • Language = en-AU (Australia) --> domain = en-au.example.com (Is this correct?)
  • Language = en-CA (Canada) --> domain = en-ca.example.com (Is this correct?)

We know that en.example.com is valid, but not sure about en-au.example.com. We are using these language codes. We want to be sure that the different Search Engines such as Google's can determine what the proper language and country is per subdomain.

已采纳解答

原帖链接 · Maximillian Laumeister · CC BY-SA 4.0

Google determines language by running your page through a machine learning algo, they don't use tags:

Google uses the visible content of your page to determine its language. We don’t use any code-level language information such as lang attributes, or the URL. You can help Google determine the language correctly by using a single language for content and navigation on each page, and by avoiding side-by-side translations.

Managing multi-regional and multilingual sites - Google

That being said, be sure to use the lang attribute on your HTML to declare the language of your page for less advanced crawlers.

As far as proper subdomain is concerned, crawlers will do just fine with most URL schemes, so it's advised to just do your URLs the most human-readable way. I see no problem with the examples you provided!

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

资料来源与适用范围

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

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

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