Skip to content

Instantly share code, notes, and snippets.

@davidkeen
Last active August 29, 2015 14:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save davidkeen/531bab2c0cb04ac2c6cf to your computer and use it in GitHub Desktop.
Save davidkeen/531bab2c0cb04ac2c6cf to your computer and use it in GitHub Desktop.
Block referer spam in Nginx
map $http_referer $bad_referer {
default 0;
"~semaltmedia\.com" 1;
"~100dollars-seo\.com" 1;
"~buttons-for-your-website\.com" 1;
"~best-seo-offer\.com" 1;
}
# Server block
# if ($bad_referer) {
# return 444;
# }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment