Skip to Content
Enabling Gzip Compression

Enable GZIP Compression

Enabling mod_deflate on a website will compress the HTML and CSS files through Gzip.

To enable Gzip Compression:

  • SSH into the website you would like to enable mod_deflate on

  • Copy and paste the code below into the existing .htaccess file. If a htaccess does not exist, create a .htacess in the top level directory

    <IfModule mod_deflate.c> AddOutputFilterByType DEFLATE text/plain AddOutputFilterByType DEFLATE text/html AddOutputFilterByType DEFLATE text/xml AddOutputFilterByType DEFLATE text/shtml AddOutputFilterByType DEFLATE text/css AddOutputFilterByType DEFLATE application/xml AddOutputFilterByType DEFLATE application/xhtml+xml AddOutputFilterByType DEFLATE application/rss+xml AddOutputFilterByType DEFLATE application/javascript AddOutputFilterByType DEFLATE application/x-javascript </IfModule>
Last updated on