阻止 robots.txt 中的子目录

发布于 2024-11-30 03:24:44 字数 1459 浏览 2 评论 0原文

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

墨离汐 2024-12-07 03:24:44

您还可以在您不希望机器人索引/关注的页面中使用 ,但请始终记住这些文件中的所有内容是自愿的,机器人可以选择不跟随,所以我建议 IP 或用户代理阻止作为更好的路线。

You could also use <meta name="robots" content="noindex, nofollow" /> in the pages you dont want to robots to index/follow, however always remember that everything in these files is voluntary and the robots can choose not to follow so I recommend ip or user agent blocking as a better route.

最后的乘客 2024-12-07 03:24:44

这适用于 Google,但不保证适用于其他蜘蛛。正如 Secretformula 建议的那样,最好的选择是在服务器端逻辑中使用 ip 或用户代理阻止

User-agent: *
Disallow: /*/settings

This will work with Google, but isn't guaranteed to work with other spiders. As secretformula suggested, your best bet is to go with ip or user agent blocking in your server side logic

User-agent: *
Disallow: /*/settings
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文