🤖 robots.txt 规则测试robots.txt Tester
粘贴 robots.txt 内容,输入一个或多个网址和爬虫名称,立即判断是否允许抓取,并指出命中的是哪一行规则;按 RFC 9309 标准(与 Google 一致)的最长匹配规则计算。Paste a robots.txt, enter one or more URLs and a crawler name, and instantly see whether each URL may be crawled and which line decided it — using the RFC 9309 longest-match rules that Google follows.
使用说明与常见问题How-to & FAQ
「robots.txt 规则测试」是什么?What is the robots.txt Tester tool?
粘贴 robots.txt 内容,输入一个或多个网址和爬虫名称,立即判断是否允许抓取,并指出命中的是哪一行规则;按 RFC 9309 标准(与 Google 一致)的最长匹配规则计算。Paste a robots.txt, enter one or more URLs and a crawler name, and instantly see whether each URL may be crawled and which line decided it — using the RFC 9309 longest-match rules that Google follows.
如何使用「robots.txt 规则测试」?How do I use the robots.txt Tester?
在上面的框粘贴 robots.txt 全文,在第二个框每行填一个要测试的网址或路径,选择或输入爬虫名称(如 Googlebot、Baiduspider)。结果会列出每个网址「允许 / 禁止」以及决定结果的规则和行号。Paste the full robots.txt in the first box, put one URL or path per line in the second box, and choose or type a crawler name (e.g. Googlebot, Bingbot). Each URL is marked Allowed or Blocked with the rule and line number that decided it.
Allow 和 Disallow 同时匹配时听谁的?What if both Allow and Disallow match?
按 RFC 9309(Google 同样采用):路径越长、越具体的规则优先;长度相同时 Allow 优先。规则在文件里的先后顺序没有影响。Per RFC 9309 (also used by Google) the longest, most specific matching rule wins, and Allow wins a tie. The order of rules in the file does not matter.
爬虫会同时遵守 * 组和自己名字的组吗?Does a crawler follow both the * group and its own group?
不会。如果有专门写给它的 User-agent 组,它只看那一组,完全忽略 * 组;只有没有专属组时才使用 *。No. If a group names the crawler, it follows only that group and ignores *; the * group applies only when no specific group exists.
「robots.txt 规则测试」免费吗?数据会上传吗?Is the robots.txt Tester free? Is my data uploaded?
「robots.txt 规则测试」完全免费,无需注册或安装,手机和电脑都能用;所有处理都在你的浏览器本地完成,输入的内容和文件不会上传到服务器。The robots.txt Tester is completely free with no sign-up or install and works on phones and desktops; everything runs locally in your browser and nothing you enter is uploaded.