Find server version disclosure in your website's responses
Server and X-Powered-By headers can reveal the software behind your website. That gives someone a starting point for identifying your stack; it doesn't prove a particular attack will work.
Remove Server and X-Powered-By disclosures
| Software | Configuration to review |
|---|---|
| Express | Disable X-Powered-By with app.disable('x-powered-by'). |
| Next.js | Set poweredByHeader: false in the Next.js configuration. |
| nginx | Set server_tokens off; to suppress the nginx version in headers and error pages. This doesn't remove the Server header itself. |
| IIS | On supported systems, set request filtering's removeServerHeader to true. Remove an inherited X-Powered-By custom header separately. |
Check IIS support before removing the Server header
The IIS Server-header setting was added in IIS 10.0 and doesn't work on Windows versions before Windows Server version 1709 or Windows 10 version 1709. Check the operating system as well as the IIS version before using it.
Microsoft documents this under request filtering. Its custom-header settings cover headers such as
X-Powered-By.
Keep software updated after fixing server version disclosure
Someone may still recognize your app from other behavior in its responses. Removing a banner doesn't fix a vulnerability in the software it named. Keep up with updates for the software you run.
Express's security guidance explains the limits of hiding its header.
Frequently asked questions
Is server version disclosure the same as a missing security header?
No. A missing protective header can leave browser behavior unrestricted. A header that identifies software reveals information; it doesn't set those protections.
Review security headers beyond software disclosures
Website security
Catch leaked API keys and exposed files before someone uses them against you.
Security headers
Learn which response headers guide browser behavior and where to add them.