Advertisement
msrougi

Bloquear Bots no Nginx|Blocking bots in Nginx

Dec 28th, 2016
138
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. # Inserir abaixo de:
  2. # server {
  3. # listen 80 default_server;
  4. # server_name seusite.com;
  5. # root /usr/share/nginx/html;
  6. #
  7.  
  8. if ( $http_user_agent ~* 'AhrefsBot|MJ12bot|rogerbot|SemrushBot|dotbot|Alexibot|Surveybot|Xenu|exabot|gigabot|BlekkoBot' ) {
  9. return 301 http://www.bing.com/;
  10. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement