Skip to content

Instantly share code, notes, and snippets.

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;

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:

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