User Tools

Site Tools


directadmin:apache-block-bad-bots

Block bad bots in Apache on DirectAdmin

Just add belove text to file /etc/httpd/conf/extra/httpd-includes.conf :

### BAD BOTS BLOCK
SetEnvIfNoCase User-Agent "AhrefsBot" bad_bots
SetEnvIfNoCase User-Agent "Dotbot" bad_bots
SetEnvIfNoCase User-Agent "MJ12bot" bad_bots
SetEnvIfNoCase User-Agent "SemrushBot" bad_bots
#SetEnvIfNoCase User-Agent "Yandex" bad_bots
#SetEnvIfNoCase User-Agent "YandexBot" bad_bots
<Location />
Order Allow,Deny
Deny from env=bad_bots
Allow from all
</Location>
###
directadmin/apache-block-bad-bots.txt · Last modified: 2018/06/04 12:08 by dreiggy

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki