Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
HTTP referer spam blocking for nginx
map $http_referer $bad_referer {
hostnames;
default 0;
.semalt.com 1;
.kambasoft.com 1;
.savetubevideo.com 1;
.descargar-musica-gratis.net 1;
.7makemoneyonline.com 1;
.baixar-musicas-gratis.com 1;
.iloveitaly.com 1;
.iloveitaly.co 1;
.ilovevitaly.ru 1;
.fbdownloader.com 1;
.econom.co 1;
.buttons-for-website.com 1;
.buttons-for-your-website.com 1;
.free-share-buttons.com 1;
.srecorder.co 1;
.darodar.com 1;
.priceg.com 1;
.blackhatworth.com 1;
.adviceforum.info 1;
.hulfingtonpost.com 1;
.best-seo-offer.com 1;
.best-seo-solution.com 1;
}
# Insert this in server configuration:
# if ($bad_referer) {
# return 444;
# }

This is a great list. We've been putting together a similar list which contains even more spam referral sites which you might want to add to your list. Sadly our list is constantly growing so please keep visiting it. http://lonegoatuk.tumblr.com/post/107307494431/google-analytics-referral-spambot-list

chovy commented Jan 10, 2016

how do i use this?

edit: found the answer here http://stackoverflow.com/a/33578063/33522

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