How to block malicious bots from apache server.

How to block malicious bots from apache server.

If your apache server has heavy load then check the access log to see who is send most requests.

If this is a bot or spider then block it.

in apache open httpd.conf to add a global rule.

in the <Directory> where htdocs is add this code

Require all denied
Require ip 47.128.0.0/16

It will block access from all the ips starting from 47.128

If it does not solve the problem then your have to add the rule to block the spider / bot by its name like this

Leave a Comment

Scroll to Top