Bloking Bad bots
Ph. Gras
ph.gras at worldonline.fr
Mon Nov 14 17:12:28 UTC 2016
Hi there !
so I do, with 2 different ways :
==============================================
if ($http_user_agent ~* MJ12bot|SemrushBot) {
return 403;
}
if ($http_user_agent ~* bot|crawl|spider|tools|java) {
rewrite ^ http://www.cnrtl.fr/definition/créole redirect;
}
==============================================
Regards,
Ph. Gras
Le 14 nov. 2016 à 16:04, "debilish99" <nginx-forum at forum.nginx.org> a écrit :
> Hello,
>
> I have a server with several domains, in the configuration file of each
> domain I have a line like this to block bad bots.
>
> If ($ http_user_agent ~ *
> (zealbot|MJ12bot|AhrefsBot|sogou|PaperLiBot|uipbot|DotBot|GetIntent|Cliqzbot|YandexBot|Nutch|TurnitinBot|IndeedBot)
> Return 403;
> }
>
> This works fine.
>
> The question is, if I increase the list of bad bots to 1000, for example,
> this would be a speed problem when nginx manages every request that
> arrives.
>
> I have domains that can have 500,000 hits daily and up to 20,000 hits.
>
> Thank you all.
>
> Greetings.
>
> Posted at Nginx Forum: https://forum.nginx.org/read.php?2,270930,270930#msg-270930
>
> _______________________________________________
> nginx mailing list
> nginx at nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
More information about the nginx
mailing list