Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

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.

share|improve this question
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 1 '12 at 3:49

3 Answers 3

I've recommended similar tactics before.

share|improve this answer

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

share|improve this answer

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.