Add inside nginx server block
# case insensitive matching if ($http_user_agent ~* (crawler1|spiderbot|wget|curl)) { return 403; }