X-Powered-By: a header worth removing
X-Powered-By names the framework or runtime that generated a response. It is non-standard, serves no protocol purpose, and is usually removed.
At a glance
- Direction
- Response only. Non-standard, and added by default by several frameworks.
- Defined in
- Non-standard. It appears in no RFC.
- When absent
- Nothing changes. No client behaviour depends on it.
- Typical value
- A product name, sometimes with a version
- Protocol purpose
- None. It is advertising with a side effect.
- Related leaks
- Server, and framework specific headers such as version or generator lines
- Removal
- A configuration or middleware setting in most stacks
In detail
The header exists because frameworks add it by default, not because anything reads it. No client changes behaviour based on the value, no cache keys on it, and no specification mentions it. It is one line of self promotion that ships on every response your service ever sends.
The cost is disclosure. A version number here tells a scanner which published vulnerabilities to try before it sends a probe, and even without a version the product name narrows the search considerably. That is not a serious defence on its own, but it is free to remove and it takes your site out of results built by matching on this header.
Removing it is usually one setting or one line of middleware, and it is worth doing at the same time as trimming the Server header, since leaving one and removing the other achieves very little. Check what else your stack adds by default while you are there: several frameworks emit their own version or generator headers with the same problem.
Do not overstate the benefit. Response header order, cookie naming, error page wording and default asset paths still identify most stacks to anyone looking properly. Removing the header is tidying that closes an easy automated match, and the patching underneath it is what actually matters.
It is also worth checking from outside rather than from the code. Application gateways, security appliances and hosting platforms all add headers of their own, so a service that sends nothing itself can still arrive at the client with a product name attached. The response as your visitors receive it is the only version that counts.
Examples
HTTP/1.1 200 OK
X-Powered-By: Express
Server: nginx/1.24.0curl -sI https://example.com | grep -iE '^(server|x-powered-by|x-aspnet-version):'Things that catch people out
- Removing this header while leaving a fully versioned Server header discloses the same class of information anyway.
- It can be added by a layer you did not configure, such as an application gateway, so check the response from outside rather than trusting the code.
- Treating removal as a security control is a mistake. It closes an automated match, and nothing more.
Try it: HTTP Headers Checker
Check a live URL or paste headers you already have. It grades six security headers from A+ to F and lists every other header the response returned.
HTTP Headers Checker
LOCAL · Browser-OnlyView HTTP response headers for any URL
Enter any website URL to fetch and analyze its HTTP response headers. We'll automatically add https:// if needed.
Why Check Security Headers?
Security headers protect your website against common attacks like XSS, clickjacking, and MIME sniffing. They're set by your web server and cost nothing to implement. Missing security headers are one of the most common findings in security audits.
Related HTTP headers
All http headers →Server: what software answered the request
What the Server header conveys, why exposing a version number helps attackers narrow their targets, and what to put there instead of removing it entirely.
Via: the proxies a message passed through
How Via records each intermediary, what the protocol and pseudonym fields mean, how it detects request loops, and why it is useful when debugging a cache.
X-XSS-Protection: a legacy header and why it is off
What the browser XSS auditor did, why Chrome and Edge removed it, why 0 is now the recommended value, and what to send in its place.
User-Agent: what the client says it is
Why User-Agent strings look the way they do, why browsers are freezing and reducing them, and what to use instead of parsing one for feature decisions.
Strict-Transport-Security: the HSTS response header
What Strict-Transport-Security does, what max-age and includeSubDomains change, why preload is close to permanent, and how to withdraw the policy safely.
Content-Security-Policy: directives, sources and reporting
How CSP directives are matched, what default-src actually falls back to, why unsafe-inline defeats the point of a policy, and how nonces and hashes work.
Tools for this
- HTTP Headers Checker Free online HTTP headers checker - view HTTP response headers for any URL
- htaccess Generator Free online htaccess generator - generate Apache .htaccess redirect and rewrite rules