Skip to content

Commit

Permalink
Ban SemrushBot for good inside nginx
Browse files Browse the repository at this point in the history
Up to 2 weeks to fetch an update for robots.txt? Let's do it the quick way
  • Loading branch information
Southparkfan committed Jan 23, 2019
1 parent 11ac57b commit daad389
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions modules/varnish/templates/mediawiki.conf
Expand Up @@ -49,6 +49,11 @@ server {
if ($http_user_agent ~ "OpenVAS 8.0.9") {
return 403;
}

# Way too much traffic.
if ($http_user_agent ~ "SemrushBot") {
return 403;
}

location / {
proxy_pass http://127.0.0.1:81;
Expand Down Expand Up @@ -122,6 +127,11 @@ server {
return 403;
}

# Way too much traffic.
if ($http_user_agent ~ "SemrushBot") {
return 403;
}

<% if property['hsts'] == "strict" %>
add_header Strict-Transport-Security "max-age=15768000; includeSubDomains; preload";
<% else %>
Expand Down

0 comments on commit daad389

Please sign in to comment.