# Google 通知从 robots.txt 中移除“noindex”声明

**URL:** <https://meta.discourse.org/t/google-notification-to-remove-noindex-statements-from-robots-txt/124265>\
**Category:** Support\
**Created:** [2019年七月29日 10:28 UTC](https://meta.discourse.org/t/google-notification-to-remove-noindex-statements-from-robots-txt/124265 "2019-07-29T10:28:55Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Arta\_S](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/arta_s/32/537495_2.png) [@Arta\_S](https://meta.discourse.org/u/Arta_S)\
**Post date:** [2019年七月29日 10:28 UTC](https://meta.discourse.org/t/google-notification-to-remove-noindex-statements-from-robots-txt/124265/1 "2019-07-29T10:28:55Z")

</div>

你好，

我刚刚收到了谷歌的这封邮件：

从 robots.txt 中移除“noindex”指令

 ![Screenshot%20at%20Jul%2029%2014-28-09](https://global.discourse-cdn.com/meta/original/3X/4/d/4df085acc16b9d929b6df3b4c0f3191b58d156b0.png)

社区里有人遇到过这种情况吗？我需要采取什么措施吗？

谢谢

---

<div class="post-metadata">

**Author:** ![NicholasDev](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nicholasdev/32/82026_2.png) [@NicholasDev](https://meta.discourse.org/u/NicholasDev)\
**Post date:** [2019年七月29日 10:46 UTC](https://meta.discourse.org/t/google-notification-to-remove-noindex-statements-from-robots-txt/124265/2 "2019-07-29T10:46:42Z")

</div>

看起来谷歌刚刚发布了这个，我也收到了一封邮件。

---

<div class="post-metadata">

**Author:** ![WaitroseCarpark](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/waitrosecarpark/32/198599_2.png) [@WaitroseCarpark](https://meta.discourse.org/u/WaitroseCarpark)\
**Post date:** [2019年七月29日 11:02 UTC](https://meta.discourse.org/t/google-notification-to-remove-noindex-statements-from-robots-txt/124265/3 "2019-07-29T11:02:44Z")

</div>

我也是，发帖是为了关注各种意见等。

---

<div class="post-metadata">

**Author:** ![irenz](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/irenz/32/120863_2.png) [@irenz](https://meta.discourse.org/u/irenz)\
**Post date:** [2019年七月29日 11:11 UTC](https://meta.discourse.org/t/google-notification-to-remove-noindex-statements-from-robots-txt/124265/4 "2019-07-29T11:11:01Z")

</div>

同样的邮件，我需要自己处理吗？该如何处理？

---

<div class="post-metadata">

**Author:** ![Steven](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/steven/32/187890_2.png) [@Steven](https://meta.discourse.org/u/Steven)\
**Post date:** [2019年七月29日 12:07 UTC](https://meta.discourse.org/t/google-notification-to-remove-noindex-statements-from-robots-txt/124265/6 "2019-07-29T12:07:31Z")

</div>

别担心，这已编码在核心中，Discourse 团队将对其进行更新，几天内即可修复，我们只需升级我们的 Discourse 即可。

不过，对于最急切的用户，现在可以编辑 robots.txt 文件了：

> [@Needing to edit robots.txt file - where is it?](https://meta.discourse.org/t/needing-to-edit-robots-txt-file-where-is-it/93879/40):
>
> I’ve created a PR for this: Screenshots:

---

<div class="post-metadata">

**Author:** ![jrivettcsa](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jrivettcsa/32/151272_2.png) [@jrivettcsa](https://meta.discourse.org/u/jrivettcsa)\
**Post date:** [2019年七月29日 14:12 UTC](https://meta.discourse.org/t/google-notification-to-remove-noindex-statements-from-robots-txt/124265/7 "2019-07-29T14:12:53Z")

</div>

Google Search Console 正在向我们发送有关 Discourse 站点的消息：

> 请从 [https://discourse.hookproductivity.com/](https://discourse.hookproductivity.com/) 的 robots.txt 文件中移除 ‘noindex’ 指令。
> 
> 致 [https://discourse.hookproductivity.com/](https://discourse.hookproductivity.com/) 的站长：
> 
> Google 已识别出您网站的 robots.txt 文件中包含不受支持的指令 ‘noindex’。
> 
> 该指令从未得到 Google 的官方支持，并将于 2019 年 9 月 1 日起停止生效。请参阅我们的帮助中心，了解如何阻止页面被 Google 索引。

---

<div class="post-metadata">

**Author:** ![awesomerobot](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/awesomerobot/32/142900_2.png) [@awesomerobot](https://meta.discourse.org/u/awesomerobot)\
**Post date:** [2019年七月29日 14:37 UTC](https://meta.discourse.org/t/google-notification-to-remove-noindex-statements-from-robots-txt/124265/11 "2019-07-29T14:37:08Z")

</div>

**如果您尚未自定义 `robots.txt` 文件，则无需执行任何操作** ……`disallow` 已经承担了大部分工作。

默认情况下，Discourse 在 `robots.txt` 中同时使用 `disallow` 和 `noindex`。

在 [关于此更新的官方博客文章](https://webmasters.googleblog.com/2019/07/a-note-on-unsupported-rules-in-robotstxt.html) 中，Google 建议使用 `disallow`，而我们早已采用此做法。我们额外使用 `noindex` 以帮助避免 Google 提到的链接问题（我已对相关部分加粗强调）……

> **robots.txt 中的 Disallow** ：搜索引擎只能索引它们已知的页面，因此阻止页面被爬取通常意味着其内容不会被索引。 **尽管搜索引擎也可能根据其他页面的链接对 URL 进行索引，但在未看到内容本身的情况下，我们的目标是使此类页面在未来更不易被看到。**

在我们这边，我们将考虑进行更新，添加 `noindex` 元标签，或在 HTTP 响应中使用 `X-Robots-Tag` 头，以确保当链接出现在其他页面上时，Google 不会对其进行索引（如有任何变更，我们将在此主题中更新）。

如果您已通过 `/admin/customize/robots` 管理页面在 `robots.txt` 中添加了自定义的 `noindex` 规则，请将其更改为 `disallow`。

---

<div class="post-metadata">

**Author:** ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)\
**Post date:** [2019年七月30日 06:02 UTC](https://meta.discourse.org/t/google-notification-to-remove-noindex-statements-from-robots-txt/124265/12 "2019-07-30T06:02:30Z")

</div>

在 `robots.txt` 中包含 noindex 是一项不明智的“SEO”调整，我们大约在一年前不幸被说服进行了该调整（[相关讨论](https://meta.discourse.org/t/pages-listed-in-the-robots-txt-are-crawled-and-indexed-by-google/100309)）。该调整现已回退，并已反向移植到稳定版。

---

<div class="post-metadata">

**Author:** ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)\
**Post date:** [2019年七月30日 06:04 UTC](https://meta.discourse.org/t/google-notification-to-remove-noindex-statements-from-robots-txt/124265/13 "2019-07-30T06:04:54Z")

</div>


