Skip to content

Instantly share code, notes, and snippets.

@LEXASOFT
Created October 17, 2019 17:57
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 LEXASOFT/a3aec384291d4a2753d22d3fe6584913 to your computer and use it in GitHub Desktop.
Save LEXASOFT/a3aec384291d4a2753d22d3fe6584913 to your computer and use it in GitHub Desktop.
Block bad bots in Nginx
SetEnvIfNoCase User-Agent "Ahrefs" bad_bot
<Limit GET POST HEAD>
Order Allow,Deny
Allow from all
Deny from env=bad_bot
</Limit>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment