vps交流

怎样禁用垃圾爬虫?没用的来一堆 我去


最猛是这个mj12bot

百度一个都不来。无语

可以通过UA禁止                  
一般就是 屏蔽 ua 。。。。 某度 某歌 一大把教程
nginx的,我也禁止了很多,如果上了CF的话,也可以在CF的防火墙规则里面添加

  1. if ($http_user_agent ~ "Neevabot|TTD-Content|FeedDemon|ThinkBot|MTRobot|SMTBot|LieBaoFast|Punkspider|MauiBot|Barkrowler|MegaIndex.ru|JikeSpider|TkBot|Indy Library|Alexa Toolbar|AskTbFXTV|AhrefsBot|CrawlDaddy|CoolpadWebkit|Java|Feedly|UniversalFeedParser|ApacheBench|SemrushBot|Swiftbot|ZmEu|oBot|jaunty|Python-urllib|lightDeckReports Bot|YYSpider|DigExt|HttpClient|MJ12bot|heritrix|EasouSpider|LinkpadBot|Ezooms|bsalsa|DotBot|newspaper|DataXu|Daum|BLEXBot|Scrapy|PetalBot|proximic|GrapeshotCrawler|Mail.RU_Bot|Nimbostratus-Bot|DuckDuckGo-Favicons-Bot|ias-sg|AdsTxtCrawler|ias-va|ias-or|SeznamBot|ias-va|ias|ias-ir|evc-batch|AspiegelBot|Re-re Studio|ias-or|^$" )
  2. {
  3.   return 403;
  4. }

复制代码