IIS only serve requests with hostnames
Solution 1:
You can use the Url Rewrite feature of IIS to do that :
- Open the URL Rewrite feature :
Add a rule of type "Request blocking" :
Block the requests based on host name :
If you know your IP address, you can use it to block requests which use it :
Or you can block all requests which are not using the domain name :
Hope this helps (It took me ages to find that).
Please note that I have no idea of the performance overhead of this usage.
Solution 2:
This is, frankly, beneath caring about, however...
- Set up the default site on the server to point to a blank directory, or static files, or something you don't care about getting hammered by "malicious scanners". [booga booga]
- Don't map any blank host headers to your sites in IIS.