Here's a snippet of an .htaccess file that blocks several User-Agents (web browsers; actually bots, really).
SetEnvIfNoCase User-Agent "^Titan" bad_bot
SetEnvIfNoCase User-Agent "^Wget" bad_bot
SetEnvIfNoCase User-Agent "^SiteSnagger" bad_bot
SetEnvIfNoCase User-Agent "^WebAuto" bad_bot
SetEnvIfNoCase User-Agent "^NetAnts" bad_bot
SetEnvIfNoCase User-Agent "^WebZip/4.0" bad_bot
SetEnvIfNoCase User-Agent "^httplib" bad_bot
<Limit get="" post="" head="">
Order Allow,Deny
Allow from all
Deny from env=bad_bot
</Limit>
The list of "bad" User-Agents here is very small and is given only as an example.
Applies to: Apache 2.x
Comments