How to Enable Basic Compression for your Website using Gzip/Deflate

In this article, we will show you how to enable website compression using the htaccess deflate option. Website compression can greatly reduce your bandwidth usage.
To see if your website is already compressed or how much you could potentially save from compression you can use many online tools.

For this demonstration, you will need basic knowledge of htaccess files and how to create/edit them.

1) Login to your account using either (s)FTP, SSH, or the File Manager

2) Create or edit the htaccess file inside of your web root (public_html).

3) Add all or part of the following depending on what filetypes you wish to compress.

AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/xml
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

4) Save the changes.

For more advanced information regarding deflate, please click here.

Was this answer helpful?

 Print this Article

Also Read

Expires Caching Explained

Web page designs are getting more and more complex, which means more scripts, stylesheets,...

How much bandwidth/storage have I used?

You can see the amount of bandwidth and storage you have used and the amount you have left on...

Steps To Take To Speed Up WordPress And Lower Your Resource Point Usage

Wordpress can get slow and resource usage can become a big problem.There are a lot of ways to...