apache、iis6、ii7独立ip主机屏蔽拦截蜘蛛抓取(适

seo优化 2022-07-27 11:52www.1681989.comseo排名

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

1. 使用网站管理助手环境http://.west./faq/list.asp?unid=650 参考此说明启用设置伪静态组件

2.  wdows2003+iis手工建站环境http://.west./faq/list.asp?unid=639 参考此说明加载伪静态组件

3.  然后在配置文件中按推火网以下系统规则配置

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

<IfModule mod_rewrite.c>

RewriteEnge On

#Block spider

RewriteCond %{HTTP_USER_AGENT}   "SemrushBot|Webdup|AcoonBot|AhrefsBot|Ezooms|EdisterBot|EC2LkFder|jikespider|Purebot|MJ12bot|WangIDSpider|WBSearchBot|Wotbox|xbfMozilla|Yottaa|YandexBot|Jee|SWEBot|spbot|TurnitBot-Agent|mail.RU|curl|perl|Python|Wget|Xenu|ZmEu"   [NC]

RewriteRule !(^robots\.txt$) - [F]

</IfModule>

wdows2003下 规则文件httpd.conf

#Block spider

RewriteCond %{HTTP_USER_AGENT}   (SemrushBot|Webdup|AcoonBot|AhrefsBot|Ezooms|EdisterBot|EC2LkFder|jikespider|Purebot|MJ12bot|WangIDSpider|WBSearchBot|Wotbox|xbfMozilla|Yottaa|YandexBot|Jee|SWEBot|spbot|TurnitBot-Agent|mail.RU|curl|perl|Python|Wget|Xenu|ZmEu)   [NC]

RewriteRule !(^/robots.txt$) - [F]

wdows2008下 web.config

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

<configuration>

<system.webServer>

<rewrite>

<rules>

<rule name="Block spider">

<match url="(^robots.txt$)"   ignoreCase="false" negate="true" />

<conditions>

<add   put="{HTTP_USER_AGENT}"   pattern="SemrushBot|Webdup|AcoonBot|AhrefsBot|Ezooms|EdisterBot|EC2LkFder|jikespider|Purebot|MJ12bot|WangIDSpider|WBSearchBot|Wotbox|xbfMozilla|Yottaa|YandexBot|Jee|SWEBot|spbot|TurnitBot-Agent|curl|perl|Python|Wget|Xenu|ZmEu"   ignoreCase="true" />

</conditions>

<action   type="AbortRequest" />

</rule>

</rules>

</rewrite>

</system.webServer>

</configuration>

Ngx对应屏蔽规则

代码需添加到对应站点配置文件server段内

if ($http_user_agent ~ "Bytespider|Java|PhantomJS|SemrushBot|Scrapy|Webdup|AcoonBot|AhrefsBot|Ezooms|EdisterBot|EC2LkFder|jikespider|Purebot|MJ12bot|WangIDSpider|WBSearchBot|Wotbox|xbfMozilla|Yottaa|YandexBot|Jee|SWEBot|spbot|TurnitBot-Agent|mail.RU|perl|Python|Wget|Xenu|ZmEu|^$"   )

{

return 444;

}

注规则中默认屏蔽部分不明蜘蛛,要屏蔽其他蜘蛛按规则添加即可

附各大蜘蛛名字

google蜘蛛googlebot

百度蜘蛛baiduspider

百度手机蜘蛛baiduboxapp

yahoo蜘蛛slurp

alexa蜘蛛ia_archiver

msn蜘蛛msnbot

bg蜘蛛bgbot

altavista蜘蛛scooter

lycos蜘蛛lycos_spider_(t-rex)

alltheweb蜘蛛fast-webcrawler

ktomi蜘蛛slurp

有道蜘蛛YodaoBot和OutfoxBot

热土蜘蛛Admrtspider

搜狗蜘蛛sogou spider

SOSO蜘蛛sosospider

360搜蜘蛛360spider

推火专家西部数码


Copyright © 2016-2025 www.1681989.com 推火网 版权所有 Power by