Hide server and framework version banners
अपडेट: 1 दिस॰ 2026
यह गाइड अभी अंग्रेज़ी में है।
What it means
Response headers reveal the exact software and version you run (e.g. "Server: nginx/1.18.0", "X-Powered-By: PHP/7.4"). Attackers use this to pick known exploits.
Why it matters
Low on its own, but makes automated attacks against unpatched versions faster. Also keep the software itself patched.
How to fix it
- Remove or genericise Server and X-Powered-By headers.
- Make sure the underlying software is on a supported, patched version.
Configuration examples
nginx (http block)
server_tokens off;
Apache
ServerTokens Prod
ServerSignature Off
Header always unset X-Powered-By
IIS (web.config)
<security>
<requestFiltering removeServerHeader="true" />
</security>
<httpProtocol>
<customHeaders>
<remove name="X-Powered-By" />
</customHeaders>
</httpProtocol>
Node.js / Express
app.disable('x-powered-by');
Laravel / PHP (php.ini)
expose_php = Off
Django
Django does not add a version header; check the fronting server (gunicorn/nginx) instead.
Any platform
Remove the Server version and X-Powered-By headers at the web server or proxy.
Check your fix
curl -sI https://YOUR_DOMAIN | grep -i -E "^server|x-powered-by"
References
- https://owasp.org/www-project-secure-headers/