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

Using hreflang and canonical in multilingual pages with untranslated content

· 52CE 我爱测

Problem I've been looking through questions on this forum (mostly old) but found conflicting information. I have a bilingual website (Thai and English) with some pages having untranslated content (let's say in Thai). The only thi…

问题原文

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

Problem

I've been looking through questions on this forum (mostly old) but found conflicting information.

I have a bilingual website (Thai and English) with some pages having untranslated content (let's say in Thai). The only things that are different are the template and the article's author's name (in respective languages)... something like, https://www.example.com/th/untranslated-content/ and https://www.example.com/en/untranslated-content/.

hreflang

This Google article tells me that I should have hreflang pointing to one another.

Some example scenarios where indicating alternate pages is recommended:

  • If you keep the main content in a single language and translate only the template, such as the navigation and footer. Pages that feature user-generated content, like forums, typically do this.

So in the Thai version I'd have

<link rel="alternate" hreflang="en" href="https://www.example.com/en/untranslated-content/" />

and in the English version I'd have

<link rel="alternate" hreflang="th" href="https://www.example.com/th/untranslated-content/" />

canonical

That's all good. But then this article says that the two pages are considered duplicate:

Different language versions of a single page are considered duplicates only if the main content is in the same language (that is, if only the header, footer, and other non-critical text is translated, but the body remains the same, then the pages are considered to be duplicates).

I take it that this implies that I should have canonical URL in the English version pointing to the Thai version (and, Thai version pointing to itself).

Thai version:

<link rel="canonical" href="https://www.example.com/th/untranslated-content/" />
<link rel="alternate" hreflang="en" href="https://www.example.com/en/untranslated-content/" />

English version:

<link rel="canonical" href="https://www.example.com/th/untranslated-content/" />
<link rel="alternate" hreflang="th" href="https://www.example.com/th/untranslated-content/" />

Interaction of the two

But then this article that I've seen cited quite a bit says that Google would have trouble with the English version, since canonical tells Google not to index it, but hreflang tells Google to index it... although having both canonical pointing to another page and hreflang is okay in mobile settings.

Is it okay to do this?

已采纳解答

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

If you don't translate the content, it is not appropriate to have both copies indexed. English users are not going to have a good user experience if they click from Google and encounter content they can't read.

Google says:

Translating only the boilerplate text of your pages while keeping the bulk of your content in a single language (as often happens on pages featuring user-generated content) can create a bad user experience if the same content appears multiple times in search results with various boilerplate languages.

Use robots.txt to block search engines from crawling automatically translated pages on your site. Automated translations don't always make sense and could be viewed as spam. More importantly, a poor or artificial-sounding translation can harm your site's perception.

You should:

  • Use <meta name="robots" content="noindex"> or robots.txt to prevent your English pages that contain Thai content from getting indexed.
  • (optional) Use <link rel="canonical" href="https://www.example.com/th/untranslated-content/" /> on your English pages with Thai content. However, because these pages are partly translated, Google is not likely to honor the canonical tag.
  • Don't use hreflang. While Google's documentation for hreflang says that you can use it for cases in which only the template is translated, I wouldn't recommend doing so. Having hreflang pointing at a page that shouldn't be indexed isn't going to help anything and could confuse search engines in some situations.

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

资料来源与适用范围

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

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

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