Skip to content

Instantly share code, notes, and snippets.

@Lindstromer
Last active August 29, 2015 14:15
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Lindstromer/027cdc630941bb905ae2 to your computer and use it in GitHub Desktop.
Save Lindstromer/027cdc630941bb905ae2 to your computer and use it in GitHub Desktop.
Block referrer spam in nginx
# Block known spam referers and give them a 444 (used for malware etc).
if ($http_referer ~* (semalt.com|bestwebsiteawards|buttons-for-website|hostingbot)) {
return 444;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment