Remove IIS server version worked for HTTP, but not HTTPS!

WindowsGeek 21 Reputation points
2021-09-14T08:20:10.47+00:00

Hello,
I used the HTTP Response headers and changed IIS to the Apache, but Nmap tool could detect IIS on port 443. How can I change it on port 443 too?

Thank you.

Windows development | Internet Information Services
Windows for business | Windows Server | Devices and deployment | Configure application groups
{count} vote

6 answers

Sort by: Most helpful
  1. rico 1 Reputation point
    2022-12-08T17:56:55.96+00:00

    My understanding of the specifics might be wrong but in essence, all routing gets handle by the HTTP Application class. In my case we used Global.asax, a class derived from HttpApplication. This is what handles GLOBAL raised events and calls.

    In my code, manipulating web.config or IIS Manager did not resolve issue. In the last leg of the journey from server to client, server was being added (thus overriding removal of it in web.config or IIS Manager). I had to target this last step in Global.asax such as:
    protected void Applicatoin_PreSendRequestHeaders()
    {
    Response.Headers.Remove("Server")
    // can add field for server as such; optional
    Response.AddHeader("Server", "nah nah nah nah nahh")
    }

    https://stackoverflow.com/questions/22401219/remove-server-response-header-iis-8-0-8-5

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.