Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

For ultimate speed, I want my Apache server strip unneeded headers from the response. Currently, the headers looks like this (excluding the status header):

Date:Sat, 15 May 2010 16:28:37 GMT
Keep-Alive:timeout=5, max=100
Server:Apache/2.2.14 (Unix) mod_ssl/2.2.14 OpenSSL/0.9.8l DAV/2 PHP/5.3.1 Phusion_Passenger/2.2.7

Which I want to be like:

Keep-Alive:timeout=5, max=100

I tried this:

Header unset Date
Header unset Server
Header unset X-Powered-By
Header unset Content-Length
Header unset X-Pad

But the server and date and content-length headers are still being sent.

How can I configure this in a .htaccess file? Thanks

share|improve this question
In what way would that improve what kind of performance? – andol May 15 '10 at 16:35
@andol It's not much, but it uses less bandwith. – rightfold May 15 '10 at 16:36
Yes, and in relation to the actual content you are serving? – andol May 15 '10 at 17:03

you could set ServerSignature Off and potentially avoid /that/ particular line.

and expose_php = Off in your php.ini to remove that line.

share|improve this answer

Date is required in HTTP/1.1.

You also can't remove Content-Length without switching to chunked transfer encoding or downgrading to HTTP/1.0 without keep-alive (but that's opposite of "ultimate speed").

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.