美国VPS apache、iis6、ii7屏蔽拦截蜘蛛抓取
云服务器
美国VPS apache、iis6、ii7屏蔽拦截蜘蛛抓取
2026-01-21 15:07
客户如果使用的美国VPS是正常的搜索引擎蜘蛛访问,不建议对蜘蛛进行禁止,否则网站在百度等搜索引擎中的收录和排名将会丢失,造成客户流失等损失。 然后在配置文件中按以下系统规则配置 Linux下规则文件.htaccess(手工创建.htaccess文件到站点根目录) RewriteEngineOn#BlockspiderRewriteCond%{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] windows2003下规则文件httpd.conf#BlockspiderRewriteCond%{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 Nginx对应屏蔽规则 代码需添加到对应站点配置文件server段内if($http_user_agent~"Bytespider|Java|PhantomJS|SemrushBot|Scrapy|Webdup|AcoonBot|AhrefsBot|Ezooms|EdisterBot|EC2LinkFinder|jikespider|Purebot|MJ12bot|WangIDSpider|WBSearchBot|Wotbox|xbfMozilla|Yottaa|YandexBot|Jorgee|SWEBot|spbot|TurnitinBot-Agent|mail.RU|perl|Python|Wget|Xenu|ZmEu|^$"){return444;} 注:规则中默认屏蔽部分不明蜘蛛,要屏蔽其他蜘蛛按规则添加即可 附各大蜘蛛名字: google蜘蛛:googlebot 百度蜘蛛:baiduspider 百度手机蜘蛛:baiduboxapp yahoo蜘蛛:slurp alexa蜘蛛:ia_archiver msn蜘蛛:msnbot bing蜘蛛:bingbot altavista蜘蛛:scooter lycos蜘蛛:lycos_spider_(t-rex) alltheweb蜘蛛:fast-webcrawler inktomi蜘蛛:slurp 有道蜘蛛:YodaoBot和OutfoxBot 热土蜘蛛:Adminrtspider 搜狗蜘蛛:sogouspider SOSO蜘蛛:sosospider 360搜蜘蛛:360spider