# 使用link-tag关联相关主题以更好地帮助搜索引擎

**URL:** <https://meta.discourse.org/t/link-related-topics-using-link-tag-for-better-helping-search-engines/234566>\
**Category:** Feature\
**Created:** [2022 年7 月 31 日 08:59 UTC](https://meta.discourse.org/t/link-related-topics-using-link-tag-for-better-helping-search-engines/234566 "2022-07-31T08:59:43Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

作者： ![guidoleenders](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/guidoleenders/32/196268_2.png) [@guidoleenders](https://meta.discourse.org/u/guidoleenders)\
发布日期： [2022 年7 月 31 日 08:59 UTC](https://meta.discourse.org/t/link-related-topics-using-link-tag-for-better-helping-search-engines/234566/1 "2022-07-31T08:59:43Z")

</div>

在我们的论坛上，我们在多个类别中区分了荷兰语和英语。每个类别都有一个主要语言，版主会确保内容被移到正确的语言类别中。

对于维基百科（wiki）中编写的内容，通常需要英文和荷兰文版本。因此，每种语言的内容都会被开发并在线发布。例如：

> **[Bepaal Autotask API-gebruiker en wachtwoord voor Power BI connector en SQL](https://forums.invantive.com/t/bepaal-autotask-api-gebruiker-en-wachtwoord-voor-power-bi-connector-en-sql/2592)**
>
> Go to English version Alle Autotask API’s zijn beschikbaar met Power BI op Invantive Cloud en met Invantive SQL op Invantive Query Tool, Invantive Data Hub, Invantive Control voor Excel, Invantive Composition voor Word en Invantive Data...

这个荷兰语内容有一个类似的英文版本，为讲英语的用户群体提供信息：

> **[Determine Autotask API user and password for Power BI connector and SQL](https://forums.invantive.com/t/determine-autotask-api-user-and-password-for-power-bi-connector-and-sql/1517)**
>
> Go to Dutch version All Autotask API’s are available with Power BI on Invantive Cloud and with Invantive SQL on Invantive Query Tool, Invantive Data Hub, Invantive Control for Excel, Invantive Composition for Word and Invantive Data Replicator. ...

这两个主题通过文本开头的超链接“转到 [语言] 版本”进行链接，以方便用户导航（并解决 Bing 和 Google 的 SEO 问题，请参阅 [Missing HTML meta-tag "Content-Language" for BING language detection](https://meta.discourse.org/t/missing-html-meta-tag-content-language-for-bing-language-detection/234565) 和 [https://meta.discourse.org/t/language-support-on-category-level-for-more-relevant-search-results/234564）。](https://meta.discourse.org/t/language-support-on-category-level-for-more-relevant-search-results/234564%EF%BC%89%E3%80%82)

然而，目前在 Discourse 中没有结构化的方法可以告知搜索引擎两个主题实际上提供相同的信息，只是语言不同。这使得搜索引擎更难以用户语言呈现内容，而且每个单独的页面都必须建立自己的页面权重，而不是将它们加在一起。

因此，在另一个网站上，我们在每个页面（和站点地图）中都包含了 `link` HTML 标签，以帮助搜索引擎理解其结构，如 [Localized Versions of your Pages | Google Search Central &nbsp;|&nbsp; Documentation &nbsp;|&nbsp; Google for Developers](https://developers.google.com/search/docs/advanced/crawling/localized-versions) 的文档所述：

```html
<link rel="alternate" hreflang="nl" href="https://cloud.invantive.com/nl/autotask" />
<link rel="alternate" hreflang="en" href="https://cloud.invantive.com/en/autotask" />
<link rel="alternate" hreflang="de" href="https://cloud.invantive.com/de/autotask" />
<link rel="alternate" hreflang="fr" href="https://cloud.invantive.com/fr/autotask" />
<link rel="alternate" hreflang="es" href="https://cloud.invantive.com/es/autotask" />
<link rel="alternate" hreflang="it" href="https://cloud.invantive.com/it/autotask" />
<link rel="alternate" hreflang="da" href="https://cloud.invantive.com/da/autotask" />
<link rel="alternate" hreflang="nb" href="https://cloud.invantive.com/nb/autotask" />
<link rel="alternate" hreflang="sv" href="https://cloud.invantive.com/sv/autotask" />
<link rel="alternate" hreflang="fi" href="https://cloud.invantive.com/fi/autotask" />
<link rel="alternate" hreflang="pt" href="https://cloud.invantive.com/pt/autotask" />
<link rel="alternate" hreflang="ja" href="https://cloud.invantive.com/ja/autotask" />
<link rel="alternate" hreflang="x-default" href="https://cloud.invantive.com/nl/autotask" />
<link rel="canonical" href="https://cloud.invantive.com/nl/autotask" />

```

这并不罕见，例如苹果公司也是这样做的：

```html
<link rel="alternate" href="https://www.apple.com/" hreflang="en-US" />
<link rel="alternate" href="https://www.apple.com/ae-ar/" hreflang="ar-AE" />
<link rel="alternate" href="https://www.apple.com/ae/" hreflang="en-AE" />
...令人惊叹的 140 种语言...
<link rel="alternate" href="https://www.apple.com/vn/" hreflang="en-VN" />
<link rel="alternate" href="https://www.apple.com/za/" hreflang="en-ZA" />
<link rel="alternate" href="https://www.apple.com.cn/" hreflang="zh-CN" />

```

如果能将主题链接起来，以便指示搜索引擎了解其结构，那将非常有帮助。这可以包括上面 `alternate` 标签中的语言链接。

---

_[View the full topic](https://meta.discourse.org/t/link-related-topics-using-link-tag-for-better-helping-search-engines/234566)._
