产品 SEO 与 GEO 智能体 付费广告智能体 网站智能体 转化智能体
运作方式 方案 常见问题 博客 预约通话

Reddit 用 robots.txt 屏蔽爬虫:对您的网站意味着什么

更新于 · 阅读约 5 分钟

简短回答 2024 年 7 月,Reddit 修改了 robots.txt,要求所有爬虫不得进入,只放行签了协议的公司,其中最主要的是 Google。Bing 因此停止抓取 Reddit。Reddit 敢这么做,是因为 AI 公司会付钱买它的数据。小企业需要的恰恰相反:确保您自己的 robots.txt 没有误把搜索引擎挡在门外。

想把这些用到您的生意上?预约一次 30 分钟的免费通话,一起聊聊。

预约通话

Reddit 屏蔽了什么,为什么

从 2024 年 7 月起,Reddit 的 robots.txt 要求所有爬虫不得进入,只有签了协议的公司才能进。robots.txt 是放在 yoursite.com/robots.txt 的一个小文本文件,用来告诉搜索引擎机器人(爬虫)可以访问哪些页面。

日期发生了什么
2024 年 2 月 22 日Reddit 向 Google 提供其帖子的结构化访问权限,包括“more efficient ways to train models”(更高效的模型训练方式)(Reddit)
2024 年 5 月 16 日OpenAI 签下类似协议,把 Reddit 内容引入 ChatGPT(Reddit)
2024 年 6 月 25 日Reddit 宣布收紧 robots.txt,并表示没有协议的机器人会被限速或屏蔽(TechCrunch)
2024 年 7 月 1 日新文件上线;Bing 停止抓取 Reddit(Microsoft,据 Android Authority 报道)
2025 年 8 月Reddit 也限制了互联网档案馆(Internet Archive),称 AI 公司在借道它抓取 Reddit(SiliconANGLE)

据报道,Microsoft 的声明是:“Bing stopped crawling Reddit after they implemented their updated robots.txt file on July 1”(Reddit 在 7 月 1 日启用更新后的 robots.txt 文件后,Bing 停止抓取 Reddit),这个文件“which prohibits all crawling of their site”(禁止对其网站的一切抓取)(Android Authority)。

Reddit 的理由是 AI,而不是搜索。一位发言人说,这次屏蔽“not at all related to our recent partnership with Google”(与我们最近和 Google 的合作完全无关),还说一些搜索引擎“unable or unwilling to make enforceable promises”(无法或不愿做出可执行的承诺)来约束如何使用其内容,“including their use for AI”(包括用于 AI)(Android Authority)。Bing、DuckDuckGo、Mojeek 和 Qwant 都不再显示 Reddit 的新帖子(9to5Google)。

Reddit 真的屏蔽了所有搜索引擎吗?

没有。Google 一直在抓取,因为签了协议的公司不受限制(TechCrunch)。文件上写的是“所有人不得进入”;真正决定谁能进的,是背后的协议和屏蔽措施。我们没有找到 2025–2026 年 Bing 恢复访问的报道,但也无法确认 Reddit 现在的文件内容。

为什么 Reddit 能这么做,而您不能

Reddit 卖的是内容。它的帖子足够值钱,Google 和 OpenAI 都付费获取访问权(Reddit、Reddit)。关上门,价格就上去了。

水管工、牙医或会计师卖的是服务。您的页面存在的意义就是被找到。您挡在门外的每一个爬虫,都是一个没法给您带来客户的搜索引擎或 AI 助手。照抄 Reddit 的文件,您会吃亏;学它有意识地决定谁能进来的习惯,您才会受益。

教训一:检查自己是否误屏蔽了搜索引擎

在浏览器里打开 yoursite.com/robots.txt。如果同时看到下面两行,就等于告诉所有爬虫跳过您的整个网站:

代码行含义
User-agent: *下面的规则适用于所有机器人
Disallow: /不要抓取任何页面

常见的两种原因:

  • 网站从测试版直接上线。 开发人员在测试网站上屏蔽了机器人,上线时忘了删掉这条规则。
  • WordPress 的一个勾选框。 在“设置”→“阅读”里的“Discourage search engines from indexing this site”(建议搜索引擎不索引本站点)。旧版本会把上面那条规则原样写进 robots.txt;从 5.3 版起改为添加 noindex 标签(WordPress)。无论哪种,您的页面都不会再正常出现在 Google 上。

修好之后,Google 大约 24 小时内会更新它保存的副本;在 Search Console 的 robots.txt 报告里点“Request a recrawl”(请求重新抓取)按钮会更快(Google)。

教训二:robots.txt 是请求,不是锁

Reddit 用限速、屏蔽和合同来配合它的文件,因为光靠文件本身什么也挡不住。Google 自己也这么说:

"The instructions in robots.txt files cannot enforce crawler behavior to your site; it's up to the crawler to obey them." (Google Search Central) 译文:“robots.txt 文件中的指令无法强制约束爬虫在您网站上的行为;是否遵守由爬虫自己决定。”
"This is used mainly to avoid overloading your site with requests; it is not a mechanism for keeping a web page out of Google." (Google Search Central) 译文:“它主要用于避免您的网站因请求过多而超负荷;它并不是让网页不出现在 Google 上的机制。”
您想要用什么
让某个页面不出现在 Google 上noindex 标签,同时在 robots.txt 中不屏蔽该页面
让文件保持私密密码
阻止某个特定的 AI 机器人针对该机器人写一行 Disallow(参见应该屏蔽哪些 AI 机器人)

不要一边在 robots.txt 里屏蔽某个页面,一边又给它加 noindex。Google 不能访问的页面,它就读不到上面的标签:

"If the page is blocked by a robots.txt file or the crawler can't access the page, the crawler will never see the noindex rule, and the page can still appear in search results, for example if other pages link to it." (Google Search Central) 译文:“如果页面被 robots.txt 文件屏蔽,或者爬虫无法访问该页面,爬虫就永远看不到 noindex 规则,该页面仍可能出现在搜索结果中,例如有其他页面链接到它时。”

教训三:robots.txt 出错也会挡住 Google

如果 Google 请求 robots.txt 时您的服务器返回错误(5xx 状态码),Google 会在最初 12 小时内停止抓取您的网站,之后最多 30 天使用最后一份正常的副本(Google)。文件不存在(404)则没问题:Google 会当作没有任何限制(Google)。如果您的主机经常宕机,请让主机商确保 robots.txt 能正常加载。

我需要管理抓取预算吗?

几乎肯定不需要。Google 的抓取预算指南针对的是 100 万以上页面且每周更新的网站,或 1 万以上页面且每天更新的网站。Google 说,如果您的页面“seem to be crawled the same day that they are published, you don't need to read this guide”(看起来在发布当天就被抓取,您就不需要读这份指南)(Google)。一家只有 30 个页面的服务企业,靠屏蔽页面来“节省”抓取,不会有任何好处。

示例

网站改版后的园林绿化公司

新网站上线后的一个月里,来自 Google 的电话减少了一半。robots.txt 里还写着 User-agent: * 和 Disallow: /,是从测试网站照搬过来的。删掉这一行并点击“Request a recrawl”后,Google 就能重新进入;随着 Google 重新抓取,页面会陆续回来。

想隐藏员工页面的诊所

员工登录页面出现在了 Google 上。网页设计师在 robots.txt 里屏蔽了它,所以 Google 从来没看到 noindex 标签。解决办法:解除屏蔽,让 noindex 生效,并给页面加上密码。

不想被用于 AI 训练的记账师

她屏蔽了只用于训练的机器人,对 Googlebot、Bingbot 和所有搜索机器人一律放行。和 Reddit 一样,她自己决定谁能进来;和 Reddit 不同的是,她留住了每一个能带来客户的搜索引擎。

常见问题

Reddit 从 Google 上消失了吗?

没有。Google 因为和 Reddit 签了协议而不受限制(TechCrunch)。Bing 以及依赖 Bing 的搜索引擎失去了 Reddit 的新帖子(9to5Google)。

一个网站能给 Google 和 Bing 提供不同的 robots.txt 吗?

技术上可以,但小企业没有理由这么做。用一个文件、为每个机器人写明各自的规则更清楚,您也能准确看到每个机器人收到的指令。

怎么测试我的 robots.txt?

在浏览器的无痕窗口中打开它,确认能正常加载,然后查看 Search Console 的 robots.txt 报告有没有错误(Google)。据 Search Engine Land 报道,旧的 robots.txt 测试工具已在 2023 年底停用。

我应该屏蔽 CSS 和 JavaScript 文件吗?

不应该。Google 说不要屏蔽这些资源文件,否则“Google won't do a good job of analyzing pages that depend on those resources”(Google 就无法很好地分析依赖这些资源的页面)(Google Search Central)。

您的情况不同?

继续阅读

下一篇Robots.txt 与 noindex:每类页面该用哪一个robots.txt 让 Google 不抓取页面;noindex 让页面不进搜索结果。感谢页、广告页、站内搜索、测试站和私密页面分别该用哪一个。

自己动手

可抓取性检查清单:让 Google 能访问到每个页面小企业网站的可抓取性检查清单:用免费工具找出孤立页面、robots.txt 屏蔽、失效链接、重定向链和服务器错误。

问我们一个问题

一句话就够。我们会通过电子邮件回复。

出处

  1. TechCrunch: Reddit's upcoming changes attempt to safeguard the platform against AI crawlers (June 25, 2024)
  2. Android Authority: Microsoft confirms Reddit blocked Bing (July 25, 2024), quoting Microsoft and Reddit
  3. 9to5Google: Reddit search engine block and the Google deal (July 25, 2024)
  4. Reddit: Expanding our Partnership with Google (February 22, 2024)
  5. Reddit: Reddit and OpenAI Build Partnership (May 16, 2024)
  6. SiliconANGLE: Reddit limits the Internet Archive (August 11, 2025)
  7. Google Search Central: Introduction to robots.txt
  8. Google Crawling: How Google interprets the robots.txt specification
  9. Google Crawling: Update your robots.txt file
  10. Google Search Central: Block Search indexing with noindex
  11. Google Crawling: Crawl budget management for large sites
  12. Search Engine Land: Google Search Console adds robots.txt report (November 2023)
  13. WordPress Documentation: Settings Reading Screen