WooCommerce站点robots.txt配置有效性咨询:阻止Bot加购及爬取购物车
WooCommerce站点robots.txt配置验证与疑问
我不确定Google robots.txt测试工具的准确性,想确认自己为WooCommerce站点编写的以下robots.txt配置能否达成这些目标:
- 阻止Bot添加商品到购物车、爬取购物车及相关页面
- 允许Google等合规Bot正常爬取站点内容
- 屏蔽部分占用服务器资源的Bot
以下是我的配置及疑问:
屏蔽高资源占用爬虫(疑问:是否需要为每个爬虫单独设置Disallow: /?)
User-agent: Baiduspider User-agent: Yandexbot User-agent: MJ12Bot User-agent: DotBot User-agent: MauiBot Disallow: /
允许其他所有Bot访问
User-agent: * Allow: /
限制合规Bot访问购物车等敏感页面
Disallow: /*add-to-cart=* Disallow: /cart/ Disallow: /checkout/ Disallow: /my-account/ Disallow: /cart/ Disallow: /checkout/ Disallow: /my-account/ crawl-delay: 10 Sitemap: https://www.example.com/sitemap.xml
我用Google的robots.txt检测工具测试上述配置后,收到一条关于crawl-delay的警告,提示该设置会被忽略。
内容的提问来源于stack exchange,提问作者dubpir8
相关产品推荐
相关产品推荐

