In IIS on a Windows VM, the Server HTTP response header is added by the web server itself. To prevent server information disclosure, configure IIS to remove or overwrite this header at the web‑server level.
A common hardening approach is:
- Configure IIS to stop sending the default
Serverheader (for example, by using a URL Rewrite outbound rule or a custom module) so that the header is either removed or replaced with a generic value. - Ensure that no application code or reverse proxy in front of IIS re‑adds a more detailed
Serverheader. - After configuration, test with a tool such as a browser dev tools network tab or
curlto confirm that responses no longer expose Windows/IIS version details.
This aligns with general guidance on avoiding information disclosure: do not expose confidential or system‑specific data in protocol metadata such as headers.
References: