Skip to content

FeroVolar/nginx-referrer-spam-block

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

nginx-referrer-spam-block

Easy way to block Crawler Referrer Spam on NGINX web server

  • create file /etc/nginx/blacklist.conf with content from this repo
  • include the file the the http block of your /etc/nginx/nginx.conf like this:
  http {
  # ...

    include blacklist.conf;

  # ...

  }
  • add conditions to the sites, for which, you want to block referer spam bots for example /etc/nginx/sites-enabled/default
  server {
    # ...

    if ($bad_referer) {
      return 444;
    }

    # ...
  }
  • restart you NGINX server

About

Easy way to block referrer spam on NGINX

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published