欢迎访问九州数码,开始您的互联网之旅吧!

apache、iis6、ii7规则屏蔽拦截蜘蛛抓取

作者:

如果是正常的搜索引擎蜘蛛访问,不建议对蜘蛛进行禁止,否则网站在百度等搜索引擎中的收录和排名将会丢失,造成客户流失等损失。可以优先考虑升级虚拟主机型号以获得更多的流量或升级为云服务器(不限流量)。 更多详情请访问: https://www.9zsm.com/faq/list.asp?unid=608 

 

蓝色部分是不明蜘蛛名称,根据需要添加,以|为分割。

 

Linux下 规则文件.htaccess(手工创建.htaccess文件到站点根目录)

<IfModule mod_rewrite.c>
RewriteEngine On
#Block spider
RewriteCond %{HTTP_USER_AGENT} "SemrushBot|Webdup|AcoonBot|AhrefsBot|Ezooms|EdisterBot|EC2LinkFinder|jikespider|Purebot|MJ12bot|WangIDSpider|WBSearchBot|Wotbox|xbfMozilla|Yottaa|YandexBot|Jorgee|SWEBot|spbot|TurnitinBot-Agent|mail.RU|curl|perl|Python|Wget|Xenu|ZmEu" [NC]
RewriteRule !(^robots\.txt$) - [F]
</IfModule>

windows2003下 规则文件httpd.conf   (在虚拟主机控制面板中用 “ISAPI筛选器自定义设置 "  开启自定义伪静态 Isapi_Rewite3.1 )

 

#Block spider
RewriteCond %{HTTP_USER_AGENT} (SemrushBot|Webdup|AcoonBot|AhrefsBot|Ezooms|EdisterBot|EC2LinkFinder|jikespider|Purebot|MJ12bot|WangIDSpider|WBSearchBot|Wotbox|xbfMozilla|Yottaa|YandexBot|Jorgee|SWEBot|spbot|TurnitinBot-Agent|mail.RU|curl|perl|Python|Wget|Xenu|ZmEu) [NC]
RewriteRule !(^/robots.txt$) - [F]


windows2008下 web.config

<?xml version="1.0" encoding="UTF-8"?>

<configuration>

    <system.webServer>

        <rewrite>

            <rules>

<rule name="Block spider">
      <match url="(^robots.txt$)" ignoreCase="false" negate="true" />
      <conditions>
        <add input="{HTTP_USER_AGENT}" pattern="SemrushBot|Webdup|AcoonBot|AhrefsBot|Ezooms|EdisterBot|EC2LinkFinder|jikespider|Purebot|MJ12bot|WangIDSpider|WBSearchBot|Wotbox|xbfMozilla|Yottaa|YandexBot|Jorgee|SWEBot|spbot|TurnitinBot-Agent|curl|perl|Python|Wget|Xenu|ZmEu" ignoreCase="true" />
  </conditions>
      <action type="CustomResponse" statusCode="403" statusReason="Forbidden" statusDescription="Forbidden" />
</rule>

            </rules>

        </rewrite>

    </system.webServer>

</configuration>

 

 

注:规则中默认屏蔽部分不明蜘蛛,要屏蔽其他蜘蛛按规则添加即可
附各大蜘蛛名字:
google蜘蛛:googlebot
百度蜘蛛:baiduspider
yahoo蜘蛛:slurp
alexa蜘蛛:ia_archiver
msn蜘蛛:msnbot
bing蜘蛛:bingbot
altavista蜘蛛:scooter
lycos蜘蛛:lycos_spider_(t-rex)
alltheweb蜘蛛:fast-webcrawler
inktomi蜘蛛:slurp
有道蜘蛛:YodaoBotOutfoxBot
热土蜘蛛:Adminrtspider
搜狗蜘蛛:sogou spider
SOSO蜘蛛:sosospider
360搜蜘蛛:360spider



来源:
阅读:414
日期:2019-08-08

收藏 】 【 打印 】  【 字体: 】 
上一篇:BaiDuSpider百度蜘蛛占用流量,robots.txt设置
下一篇:apache、iis6、iis7规则设置防盗链
若文档内容对您没有帮助,不能解决问题? 您还可以 咨询在线客服提交工单,我们将竭诚为您服务。
  >> 相关文章
 
会员 客服 QQ 电话 充值 工单
Top

24小时客服热线

若153电话正忙,请拨 

咨询售后问题请提交工单 提交工单