Forum Moderators: goodroi
1/10/2005¦4.79.40.170¦sherlock/1.0¦¦
If I want to ban that specific bot but no others, is this the correct format for my robots.txt file:
User-agent: sherlock
Disallow: /
Thanks...
Which of these you might use depends on what server you're running, and how much control of it you have, i.e. shared hosting account vs. the machine's sitting right next to you...
Jim
Jim -- I read your detailed response about "bad bods" at:
[webmasterworld.com...]
Do you recommend that approach for only blocking an occasional unwelcomed bot? (such as sherlock"), or is there a simpler .htaccess format?
For example, since posting my question I've read the following at:
[tedpavlic.com...]
### Forbid access from certain known-malicious browsers/bots
RewriteCond %{HTTP_USER_AGENT} nhnbot [NC,OR]
# Allow access to robots.txt and forbidden message
RewriteCond %{REQUEST_URI}!^/robots\.txt$ So would I just substitute "sherlock" for "nhnbot" and put all that into the htaccess file?
RewriteCond %{HTTP_USER_AGENT} ^Holmes [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^Sherlock [NC]
RewriteRule .* - [F,L]
I've noticed that they return with caps reversed, eg first as Sherlock and holmes, then sherlock and Holmes, hence the [NC].
Quick question -- if other "bad bots" show up, do I just stack them on top of what you've started? As in:
RewriteCond %{HTTP_USER_AGENT} ^Holmes [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^Sherlock [NC]
RewriteCond %{HTTP_USER_AGENT} ^bad_bot_1 [NC]
RewriteCond %{HTTP_USER_AGENT} ^bad_bot_2 [NC]
RewriteRule .* - [F,L]