![使用 Robots.txt 阻止 IP 或用户代理](https://linux22.com/image/794412/%E4%BD%BF%E7%94%A8%20Robots.txt%20%E9%98%BB%E6%AD%A2%20IP%20%E6%88%96%E7%94%A8%E6%88%B7%E4%BB%A3%E7%90%86.png)
我的网站一次又一次地受到机器人的攻击,它占用了服务器上我所有的 SQL 资源。
66.249.**.** Mozilla/5.0+(compatible;+GoogleDocs;+apps-spreadsheets;++http://docs.google.com) - 200 0 0 796
robots 文件中是否有任何方法可以阻止GoogleDocs;+apps-spreadsheets
甚至是阻止 IP 地址。
我是否只需将以下内容添加到我的 robots 文件中?
User-agent: GoogleDocs
Disallow: /