Categories: Blog

How to fix Gzip Compression

How to fix Gzip Compression.

 

Increase web site speed

Read our other blogs on how to increase web site speed too.

Option 1. Editing .htaccess



 

Gzip compression via mod_deflate (recommended) can be enabled by implementing the following code to your .htaccess file (a guide on how to locate your .htaccess file is located in your public_html directory. You can quickly access the file and it’s content by right-cliking and selecting Edit:):

<IfModule mod_deflate.c>
  AddOutputFilterByType DEFLATE text/html
  AddOutputFilterByType DEFLATE text/css
  AddOutputFilterByType DEFLATE text/javascript
  AddOutputFilterByType DEFLATE text/xml
  AddOutputFilterByType DEFLATE text/plain
  AddOutputFilterByType DEFLATE image/x-icon
  AddOutputFilterByType DEFLATE image/svg+xml
  AddOutputFilterByType DEFLATE application/rss+xml
  AddOutputFilterByType DEFLATE application/javascript
  AddOutputFilterByType DEFLATE application/x-javascript
  AddOutputFilterByType DEFLATE application/xml
  AddOutputFilterByType DEFLATE application/xhtml+xml 
  AddOutputFilterByType DEFLATE application/x-font  
  AddOutputFilterByType DEFLATE application/x-font-truetype  
  AddOutputFilterByType DEFLATE application/x-font-ttf  
  AddOutputFilterByType DEFLATE application/x-font-otf 
  AddOutputFilterByType DEFLATE application/x-font-opentype 
  AddOutputFilterByType DEFLATE application/vnd.ms-fontobject
  AddOutputFilterByType DEFLATE font/ttf 
  AddOutputFilterByType DEFLATE font/otf 
  AddOutputFilterByType DEFLATE font/opentype
# For Older Browsers Which Can't Handle Compression
  BrowserMatch ^Mozilla/4 gzip-only-text/html 
  BrowserMatch ^Mozilla/4.0[678] no-gzip
  BrowserMatch bMSIE !no-gzip !gzip-only-text/html
</IfModule>

If your server does not support mod_deflate you can try the mod_gzip alternative:

<ifModule mod_gzip.c>
  mod_gzip_on Yes
  mod_gzip_dechunk Yes
  mod_gzip_item_include file .(html?|txt|css|js|php|pl)$
  mod_gzip_item_include mime ^application/x-javascript.*
  mod_gzip_item_include mime ^text/.*
  mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.*
  mod_gzip_item_exclude mime ^image/.* 
  mod_gzip_item_include handler ^cgi-script$
</ifModule>

Once the changes are saved, gzip compression will be enabled and your web site should be faster. Go back to testing tools to verify the fix. Always call customer service if more help needed.

Option 2. CMS plug-ins

WordPress users can enable gzip compression by installing plugins such as GZip Ninja Speed Compression.

With Joomla, you can gzip your website via Sytem -> Global Configuration -> Server section. You can also view our guide on Joomla performances.

 

Option 3. Windows-based hosting

If you are using a Windows server, you can enable HTTP compression for static and dynamic content using the command line:

appcmd set config /section:urlCompression /doDynamicCompression:True

appcmd set config /section:urlCompression /doStaticCompression:True

For more specifics, you can view the official Microsoft guide .

Conclusion: 

It is easy to fix Gzip Compression issue and Increase web site speed. Your hosting company should also have tutorials about this as fixing Gzip Compression is very important step to increase web site speed


Jery Smith

This is a Stuff profile. Credit of Stories goes to all team of Vintaytime, Thank you.

Share
Published by
Jery Smith

Recent Posts

Snowflake (NYSE: SNOW) reported its Q2 FY2026 – Results vs. Expectations

Snowflake (NYSE: SNOW) reported its Q2 FY2026 earnings after market close today, beating analyst expectations…

1 week ago

Outlook Deleted Items Folder Missing? Here’s How to Restore It

Recently, we came across a query where the user can’t delete or recover deleted items…

1 month ago

Faster Images, Better Rankings: SEO Benefits of Next-Gen Formats

In the digital world we live in today, how fast your webpage loads is super…

3 months ago

Optimizing eCommerce Image Pipelines for Speed and Conversion

In the fast-moving world of online shopping today, your website only has a few seconds…

3 months ago

Warren Buffet Benjamin Graham Quality Types Undervalued Stocks June 2025

Here are 5 top rated stocks for long term, the criteria used by greatest like…

3 months ago

What Are the Top 9 YouTube Video Downloader

Here are 8 of the top YouTube video downloaders as of 2025, along with their…

4 months ago