CONF file that can be included in the nginx conf and block referrer spam websites.
- In your nginx folder (I have mine in
/etc/nginx/
) create a folderglobals
if it doesn't exists already. Copy thereferrer-spam.conf
there. - In your
sites-available
folder (for me it's in/etc/nginx/sites-available/
open the configuration of the site and intoserver
block add this line:include global/referrer-spam.conf;
, note that it shouldn't be an absolute path, and you don't need to add../
at the begining! :) - Restart nginx:
service nginx restart
Wanna test if this really works. Do it with this command:
curl --referer <referrer_website> <your_website>
curl --referer http://buttons-for-website.com http://www.rokson.co
Anyone is more than welcome to add new referrer spam websites to this list.
Thank you! :)