# robots.txt for O'Reilly 北京网站 # 最后更新:2025年 User-agent: * # 禁止爬取搜索页面(避免暴力搜索和资源浪费) Disallow: /index.php?func=search Disallow: /*?func=search # 禁止爬取示例代码和样章(受版权保护) Disallow: /codeexample/ Disallow: /samplechap/ # 禁止爬取私有目录 Disallow: /private/ # 爬取延迟(秒),减少服务器负载 Crawl-delay: 2 # 允许友好搜索引擎爬取 User-agent: Googlebot Crawl-delay: 1 User-agent: Googlebot-Image Crawl-delay: 1 User-agent: Bingbot Crawl-delay: 1 # 完全禁止的恶意/低质量爬虫 User-agent: Baiduspider Disallow: / User-agent: 360spider Disallow: / User-agent: Sosospider Disallow: / User-agent: BLEXBot Disallow: / User-agent: Sogou web spider Disallow: / User-agent: Slurp Disallow: / User-agent: AhrefsBot Disallow: / User-agent: SemrushBot Disallow: / User-agent: DotBot Disallow: / User-agent: MJ12bot Disallow: / User-agent: MegaIndex Disallow: / User-agent: PetalBot Disallow: / User-agent: Bytespider Disallow: / # 如果有 sitemap,取消下面的注释并更新 URL # Sitemap: https://www.oreilly.com.cn/sitemap.xml