This article explained the detailed IIS to configure Gzip compression method, and after the correct configuration, still can not open gzip compression solution, these experiences are the actual operation of the site to sum up, share ...
To turn on gzip compression there is a quick way to copy and paste the following content into Notepad, save it as a gzip.bat, and then place it in the C:\Inetpub\AdminScripts Directory (there are adsutil.vbs files in the directory), the implementation will automatically open gzip configuration, rather than manually.
[Ctrl + A ALL SELECT hint: You can modify some of the code, and then run]
The manual configuration method is described below:
1. Open Internet Information Services (IIS) Manager, right-click Web site-Properties, and select Services. In the HTTP Compression box, select Compress application files and compress static files, and set the maximum limit for temporary directories and temporary directories as needed;
2. In Internet Information Services (IIS) Manager, right-click "Web Service Extensions"-"Add a new Web service extension ...", enter the extension "HTTP Compression" in the new Web service Extension box, and add "required files" as C:\ Windows\system32\inetsrv\gzip.dll, where the Windows system directory may vary depending on your installation, select "Set extension status to allow";
3. Use a text editor to open C:\Windows\System32\inetsrv\MetaBase.xml (recommended to back up first),
Find location = "/lm/w3svc/filters/compression/gzip used to set gzip compression,
Find location = "/lm/w3svc/filters/compression/deflate" to set deflate compression. The top two nodes are next to each other. And the properties set are the same.
If you need to compress a dynamic file, set HcDoDynamicCompression to TRUE.
And in HcScriptFileExtensions, add the dynamic file suffix name, such as ASPX, that you want to compress;
If you need to compress a static file, set HcDoStaticCompression and HcDoOnDemandCompression to "TRUE".
And in hcfileextensions to add you need to compress the static file suffix name, such as XML, CSS, etc.;
HcDynamicCompressionLevel and HcOnDemandCompLevel indicate the desired compression rate, with a value of 0-10 and a default of 0.
HcDynamicCompressionLevel attribute Description: HcDynamicCompressionLevel Metabase Property
HcOnDemandCompLevel attribute Description: HcOnDemandCompLevel Metabase Property
Description: These two property values are generally recommended to set to 9, with the best price/performance.
Attention
1. You need to stop IIS before editing MetaBase.xml, you can use net stop IISAdmin
2. Open the IISADMIN service after the modification is completed and execute the IISRESET command
About the SEO test
Whether the compression has an impact on SEO, after testing, open can still be very good included.
About the impact of SEO research articles, you can also refer to the following several articles.
Specific efficiency issues will continue to be monitored for research.
Through the above method configuration, some users through the detection of gzip, or found that their site did not successfully open, please use the following methods to troubleshoot:
1, restart the IIS or reboot the server to try.
2, the system directory C:\WINDOWS\system32\ to give IIS users access rights.
3, Gzip compressed directory to the IIS user Read and Write permissions, and IIS_WPG user group read and write permissions.
Hope Arisisi can help you solve the problem! Good luck..