The web server shows its version
- Check
http.version_banner- Severity
- info
- Runs
- on our side, against a domain you verified
- Looks at
- Server and X-Powered-By headers with version numbers
What the check looks at
Once a day the service requests the home page of the domain over HTTPS and reads the Server and X-Powered-By headers. The check reports when either contains a version number, for example Server: Apache/2.4.71 (Debian) or X-Powered-By: PHP/8.2.7. A product name without a version (Server: nginx) passes.
Why it matters
A version number tells anyone which CVEs to try, without probing. Automated scanners collect these headers and search them for versions with known bugs. Hiding the version does not fix any vulnerability, and a determined attacker can often guess the version another way. It removes a free hint and keeps the server out of simple searches for one vulnerable version. This check is informational for that reason.
How to fix it
nginx:
server_tokens off; # in http, server or location
The header becomes Server: nginx.
Apache httpd. Set:
ServerTokens Prod
ServerSignature Off
On Debian and Ubuntu, change these lines in /etc/apache2/conf-available/security.conf, which sets ServerTokens OS by default. A separate file with the same lines is overridden if it sorts before security.conf: in a test on Debian 12, a hardening.conf with ServerTokens Prod still produced Server: Apache/2.4.71 (Debian). On RHEL family, put them in /etc/httpd/conf/httpd.conf or a file in /etc/httpd/conf.d/. The header becomes Server: Apache.
Caddy sends Server: Caddy without a version. To remove the header:
header -Server
PHP adds X-Powered-By: PHP/<version>. Set in php.ini (for PHP-FPM, the php.ini of the FPM SAPI) and restart PHP-FPM:
expose_php = Off
Express (Node.js): app.disable('x-powered-by'). Other frameworks have similar settings.
Behind a reverse proxy, the proxy may pass on the header of the application. In nginx, proxy_hide_header X-Powered-By; removes it.
How to check the fix
curl -sI https://example.com/ | grep -i -E '^(server|x-powered-by):'
After the changes above:
server: nginx
Check an error page too (curl -sI https://example.com/does-not-exist): some servers add a version to error pages separately (Apache ServerSignature).
When a warning is fine
- You cannot change the header because a hosting provider or appliance sets it. Keep that software updated; that matters more than the banner.
Sources
- nginx: server_tokens and proxy_hide_header
- Apache: ServerTokens, ServerSignature
- Caddy: header directive
- PHP: expose_php, Express: security best practices
- Tested on 2026-11-26: nginx 1.26.3 (Debian 13), Apache 2.4.71 (Debian 12, including the
security.confoverride), Caddy 2.6.2 (Debian 13)