Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Nginx configuration file for Hypernode to block unwanted bots
if ($http_user_agent ~ "PHPCrawl|bGenius|SemrushBot|Yandex|YandexBot|MegaIndex|spbot|BLEXBot|ltx71|Daum|SpotBot|DotBot|seoscanners|domaincrawler|CCBot|SeznamBot|SMTBot") {
return 403;
break;
}
@mikebranderhorst

This comment has been minimized.

Copy link

@mikebranderhorst mikebranderhorst commented Jun 15, 2018

Better use status 410 and you don't need break after return. More bots are listed here: https://gist.github.com/peterjaap/ab5801152e1d0f874476b47e0c9a4682

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment