Add inside nginx server block
# case insensitive matching if ($http_user_agent ~* (netcrawl|npbot|malicious|LWP::Simple|BBBike|wget|jorgee)) { return 403; }