Hide the server version number
Why it matters
A version number in the Server header tells attackers exactly which known vulnerabilities to try, without any probing. Hiding it fixes nothing by itself, so keep the software updated as well.
The fix
- Turn off version tokens in the web server: nginx server_tokens off; Apache ServerTokens Prod; IIS 10 removeServerHeader="true" on requestFiltering in web.config.
- If a proxy passes on an application server's Server header (Gunicorn, Kestrel, Jetty), hide it at the proxy or turn it off in that server's settings.
- Check that the server software is on a supported, patched version.
bash
curl -sI https://example.com/ | grep -i '^server:' The examples use example.com. Replace it with your own domain.
Related
Scan your domain to see whether this applies to you.