Remove Server and X-Powered-By disclosures

SoftwareConfiguration to review
ExpressDisable X-Powered-By with app.disable('x-powered-by').
Next.jsSet poweredByHeader: false in the Next.js configuration.
nginxSet server_tokens off; to suppress the nginx version in headers and error pages. This doesn't remove the Server header itself.
IISOn 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.

  • 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.