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

I would like to change the HTTP GZIP compression level in IIS7 from 0 to 4 as mentioned in these articles:

However I cannot see any reference in them (or on how to change the compression level from 0 - 10.

The compression page in IIS only has tick-boxes to enable/disable dynamic and static compression.

My Web.config file has the line:

Please can you tell me how I can do this?

share|improve this question
up vote 4 down vote accepted

You need to set it in the compression scheme:

for example to set it in gzip using AppCmd:

appcmd.exe set config -section:system.webServer/httpCompression /[name='gzip'].dynamicCompressionLevel:"5" /commit:apphost

share|improve this answer
By the way, one easy way is using Configuration Editor which will show you all the properties, and it can generate the scripts to set that (that is how I generated the AppCmd command above) – Carlos Aguilar Mares Jul 13 '10 at 4:19
Hi CarlosAg, I have installed the Configuration Editor and have it open. In section system.webServer/urlCompression. Where is the option to set the level of compression? Many thanks. – Techboy Jul 20 '10 at 18:12
Level of compression is set in system.webServer/httpCompression inside the collection, specific to the compression used (see above) – Carlos Aguilar Mares Jul 21 '10 at 0:06

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.