我想现在完全阻止必应搜索我的网站(它以惊人的速度攻击我的网站(每月500 of的数据)。
我有1000个子域添加到必应站长工具,所以我不能去设置每个人的爬行率。我曾尝试使用robots.txt阻止它,但在我的robots.txt中不起作用
# robots.txt
User-agent: *
Disallow:
Disallow: *.axd
Disallow: /cgi-bin/
Disallow: /member
Disallow: bingbot
User-agent: ia_archiver
Disallow: /发布于 2014-11-29 00:54:06
这肯定会影响你的搜索引擎优化/搜索排名,并会导致页面从索引中删除,所以请谨慎使用
如果您安装了iis重写模块,则可以根据用户代理字符串阻止请求(如果未安装,请转到here)
然后将规则添加到您的webconfig中,如下所示:
<system.webServer>
<rules>
<rule name="Request Blocking Rule" stopProcessing="true">
<match url=".*" />
<conditions>
<add input="{HTTP_USER_AGENT}" pattern="msnbot|BingBot" />
</conditions>
<action type="CustomResponse" statusCode="403" statusReason="Forbidden: Access is denied." statusDescription="You do not have permission to view this page." />
</rule>
</rules>
</system.webServer>这将返回一个403,如果机器人点击你的网站。
更新
看看你的robots.txt,我想应该是:
# robots.txt
User-agent: *
Disallow:
Disallow: *.axd
Disallow: /cgi-bin/
Disallow: /member
User-agent: bingbot
Disallow: /
User-agent: ia_archiver
Disallow: /发布于 2014-11-30 03:00:22
您的robots.txt不正确:
bingbot您需要在记录之间使用换行符(一条记录以一个或多个User-agent).
Disallow: bingbot不允许搜索路径以“bingbot”(即http://example.com/bingbot)开头的URL,这可能不是您想要的。Disallow: (因为它是默认设置)。因此,您可能想要使用:
User-agent: *
Disallow: *.axd
Disallow: /cgi-bin/
Disallow: /member
User-agent: bingbot
User-agent: ia_archiver
Disallow: /这不允许爬行"bingbot“和"ia_archiver”的任何内容。除了路径以/member、/cgi-bin/或*.axd开头的URL之外,所有其他机器人都被允许爬行所有内容。
请注意,*.axd将由遵循原始robots.txt规范的机器人逐字解释(因此它们不会爬行http://example.com/*.axd,但会爬行http://example.com/foo.axd)。然而,许多机器人扩展了规范,并将*解释为某种通配符。
https://stackoverflow.com/questions/27188531
复制相似问题