Rewrite Rule To Block User Agent

Recently we’ve seen servers being overloaded by the 80legs.com web crawler. Here’s a quick rewrite rule that can be placed in .htaccess to block 80legs:

Here’s a rule to block by user agent with Nginx:

Have a project or a problem?

Talk with a senior engineer for practical recommendations—no obligation.

Leave a comment

2 Responses

  1. that broke access to the website….

    RewriteCond %{HTTP_USER_AGENT} 80legs
    RewriteRule .* – [F,L]
    if ($http_user_agent ~ “80legs”) { return 403; }

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Posts

Categories

Get a free consultation from Reliable Penguin

Submit the form—or for immediate service call 866-649-7984.