how to Block bad bot for your website served by nginx
Some bad bot /web crawler always send lot of request to our site and make our site slow. To prevent this we need to set following setting in our nginx server block -
if ($http_user_agent ~* (.Amazonbot.|.MJ12bot.|.AhrefsBot.|.DotBot.|.SemrushBot.|.petalbot.)){ return 403; }
After save your site config restart nginx.
Be the first person to like this
Like
comment's
(0)