Mobile app version of vmapp.org
Login or Join
Angela700

: Is it a good idea to close the connection on a web hacker / spammer? When I receive a request from a web spammer, such as a GET /wp-login.php, I am thinking of replying with an error (404)

@Angela700

Posted in: #Botattack #HttpHeaders #SpamBlocker

When I receive a request from a web spammer, such as a GET /wp-login.php, I am thinking of replying with an error (404) and closing the HTTP connection immediately with this header:

Connection: close


Is that sensible? It seems to me that this way I am not unlikely to save a connection for a real user...

10.02% popularity Vote Up Vote Down


Login to follow query

More posts by @Angela700

2 Comments

Sorted by latest first Latest Oldest Best

 

@Candy875

You could just change the default WP admin URL

10% popularity Vote Up Vote Down


 

@Harper822

I'd recommend:

connection: close


on pages that don't list any other resources that are stored on your server for best performance.

If you can setup a 404 error page without loading any images or special assets, then connection: close is good.

If you need resources to completely load the error page, then connection: close isn't as good since the connection will be closed and another one will be made to load the assets. The closing and opening of a connection increases the time for all resources to be loaded.

This kind of page works with connection: close since no other server resources are required for the page to completely load:

<html>
<head>
<title>Not found</title>
</head>
<body>
Document is not found
</body>
</html>


This one uses resources from the local server, so I wouldn't recommend connection: close on it.

<html>
<head>
<title>Not found</title>
</head>
<body>
<img src="http://www.your-url.com/notfound.jpg">
Document is not found
</body>
</html>

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme