Bad bots? Recently, we’ve seen more and more traffic from bad bots. Depending on who you ask, as much as 50% of all internet traffic is caused by bots — both malicious and good. Unfortunately, all of this bot activity can easily overload a cPanel server, especially if multiple sites are hit at once.

You can reduce the impact of bad bots by implementing effective bot-blocking techniques.

The simple method we use is to add a block rule to the pre-virtual host configuration in Apache.

Adjust this to block the bots that are causing you issues. After adding, just apply and restart Apache.


<IfModule mod_headers.c>
<Location />
SetEnvIfNoCase User-Agent "Baiduspider" bad_bot
SetEnvIfNoCase User-Agent "YandexBot" bad_bot
SetEnvIfNoCase User-Agent "MJ12bot" bad_bot
SetEnvIfNoCase User-Agent "AhrefsBot" bad_bot
SetEnvIfNoCase User-Agent "SemrushBot" bad_bot
SetEnvIfNoCase User-Agent "BLEXBot" bad_bot
SetEnvIfNoCase User-Agent "Sogou Spider" bad_bot
SetEnvIfNoCase User-Agent "SeznamBot" bad_bot
<RequireAll>
Require all granted
Require not env bad_bot
</RequireAll>
</Location>
</IfModule>

 

configure cpanel apache to block bad bots

 

Menu