• 本帖最后由 哥只是传说 于 2016-4-23 01:02 编辑 *

像AhrefsBot 这些完全是浪费流量。没半点用

百度出来的结果,如不正确,请直接指出来

lnmp 下采用这段

  • 屏蔽AhrefsBot垃圾爬虫
  • if ($http_user_agent ~* AhrefsBot) {
  • return 403;
  • }
  • 如果需要屏蔽多个爬虫,可配置如下:
  • if ($http_user_agent ~* AhrefsBot|MSNBot) {
  • return 403;
  • }
  • 或者
  • if ($http_user_agent ~* "AhrefsBot|MSNBot") {
  • return 403;
  • }
  • 复制代码

apche 参考这里:https://zhangge.net/4458.html

再在robots屏蔽:

  • User-agent: AhrefsBot
  • Disallow: /
  • User-agent: BLEXBot
  • Disallow: /
  • User-agent: CompSpyBot
  • Disallow: /
  • User-agent: Exabot
  • Disallow: /
  • User-agent: Ezooms
  • Disallow: /
  • User-agent: MJ12bot
  • Disallow: /
  • - User-agent: *
  • Allow: /
  • 复制代码