4

I've read a lot about bad bot blocking, php scripts, .htaccess techniques, etc...

Is this a valid method?

Since .htacces can rewrite and send a bad bot a 403 deny or forward to something like spam poison, is it possible to Disallow a folder, then through .htaccess in that specific folder redirect to spampoison? Since Apache reads each .htaccess independently and follows specific instructions, then a bad bot not following robots.txt would just be redirected. Or anyone trying to access, /badbot/ or whatever I choose to call my trap folder.

Su'
  • 19,332
  • 3
  • 41
  • 65
Tom
  • 41
  • 1
  • 1
    You're basically describing a form of honeypot. The bot trap John references in the answer he linked to below is one particular implementation, but this is a more general term for the technique. – Su' Jul 01 '12 at 03:49

3 Answers3

2

I've recommended similar tactics before.

John Conde
  • 86,255
  • 27
  • 146
  • 241
2

What you suggest (use a bot trap to trap the bad bod, and then block it using .htaccess or your favourite scripting language) is indeed a much-used technique for dealing with robots from the dark side.

You may want to look at another thread here about this particular technique: Tactics for dealing with misbehaving robots

If you're looking for sample code that tells you how to implement it, just Google for "bot trap". Here is just one such page: http://www.kloth.net/internet/bottrap.php that I found very instructive.

Svartepjotr
  • 427
  • 4
  • 9
1

If the bots aren't changing IP's often why let them hit your server and take up usage? I would ban the IPs's first in hosts.deny / ipchains then use .htaccess and robots.txt as back up

Anagio
  • 11,195
  • 1
  • 26
  • 49