Server version disclosure: hide Server and X-Powered-By versions
Headers like Server: Apache/2.4.29 (Ubuntu) or X-Powered-By: PHP/7.2.1, and a WordPress generator tag with a version number, tell attackers exactly which exploits to try. Hiding them takes a config line each. SiteShield warns when any version number is exposed (3 of 100 points).
What is Server version disclosure?
Web servers, languages and CMSs announce themselves by default: Nginx and Apache in the Server header, PHP and many frameworks in X-Powered-By, and WordPress and other CMSs in a <meta name="generator"> tag in the page.
Server: Apache/2.4.29 (Ubuntu)
X-Powered-By: PHP/7.2.1
<meta name="generator" content="WordPress 5.2">Server: nginx
(no X-Powered-By header, no generator tag)Why it matters
Advertising exact server or framework versions lets attackers look up known exploits for that version in seconds.
Automated scanners look up advertised versions against vulnerability databases in seconds. Hiding the version doesn't fix an outdated server (you still need to update), but it stops your site from showing up in an attacker's "known vulnerable" list without them doing any work.
SiteShield maps this check to:
See how these standards fit together in the UAE website security checklist.
How SiteShield grades it
This check, "Software versions hidden", can cost up to 3 points: a fail loses all 3, a warning loses 2. Every scan starts at 100.
| Result | When | Points lost |
|---|---|---|
| Warning | The Server header contains a digit (a version), any X-Powered-By header is present, or a generator meta tag contains a version number. | 2 |
| Pass | None of these show a version. | 0 |
How to check it yourself
curl -sI https://example.com | grep -iE '^(server|x-powered-by):'
curl -s https://example.com | grep -io '<meta[^>]*generator[^>]*>'
Or run a free SiteShield scan, which checks this and 16 other settings in one go.
How to fix it
The quick version: Remove version numbers from the Server and X-Powered-By headers and the generator meta tag (e.g. server_tokens off; in nginx, expose_php = Off in PHP).
Cloudflare
- Proxied sites show
Server: cloudflareinstead of your origin's banner. - Remove X-Powered-By with Rules → Transform Rules → Modify Response Header → Remove, header name
X-Powered-By. (Cloudflare's managed transform "Remove X-Powered-By headers" does the same.)
Nginx
In the http block. Nginx will still say Server: nginx, which passes because there is no version.
server_tokens off;Apache
In the main server config (these don't work in .htaccess):
ServerTokens Prod
ServerSignature OffPHP
In php.ini, then restart PHP-FPM or Apache:
expose_php = OffWordPress
Remove the generator tag (and keep WordPress itself updated):
remove_action('wp_head', 'wp_generator');
add_filter('the_generator', '__return_empty_string');FAQ
Is hiding versions just security through obscurity?
Partly, which is why it's only worth 3 points and a warning, never a fail. It removes free information from attackers; it is not a substitute for patching.
Does Server: nginx (without a version) pass?
Yes. SiteShield only flags a Server header that contains a version number. Any X-Powered-By header is flagged, because it rarely serves visitors.
Test your Server version disclosure now
Run all 17 checks on your website and email domain in about 30 seconds. Free, no signup, passive checks only.
Rather not do it yourself? Fix it for me starts at AED 750 (about USD 205 by PayPal), quote agreed first. Monitoring re-scans weekly for AED 99/month or AED 990/year.