Enable GZIP compression via cPanel, Load your web page super FAST!

You need a faster loading web page! In this tutorial, I will teach you how you can make your webpage load super fast by enabling GZIP compression.

Sure this isn’t the only way to increase your webpage load speed. But I believe that this is the most efficient and easy way of increasing your webpage load speed.

And on the top of that, it will take you just under 2 minutes to do it. All you need to do is copy and paste a piece of code. Believe me, it’s worth it.

GZIP can compress any kind of files. Obviously, Some kind of data can be compressed better than other. Compression ratio is not the same for all types of files.

Also, read- how to read How to COMPRESS large files online before downloading. Click here

Code to be copied:

Compress files online before downloading You might wanna read.

<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 Olders 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

The above-provided code compresses the data you requested for before sending it to you. And once the required data is downloaded to your local machine, your browser then uncompress the data. So, saving time and bandwidth in the process.

Copying GZIP compression code:

  • 1) First of all login to your cPanel.

  • 2) There you will see “File Manager” under “FILES” header click on it.

A picture showing cpanel home page
File Manager
  • 3) Now make sure to not navigate anywhere from your root directory and click on “+File” located on the upper left corner of the window.

People are often confused on whether to create “.htaccess” file on root directory or in the “public_html” directory. You don’t get confused. Stay where you were initially and create new “.htaccess” file.

  • 4) Name the new file “.htaccess” without quotes(“) and then click on “Create New File“.

Creating a new .htaccess file in the rot directory via cPanel
Create new file
  • 5) Select the newly created “.htaccess” file and click on edit option locate on the upper midsection of the window.

Editing the .htaccess file to enable gzip compression

  • 6) Finally, copy the above-provided GZIP compression code and paste it into the “.htaccess” file and click on save.

Saving changes to .htaccess file after pasting GZIP compression code

Checking If GZIP compression is working or not:

  • 1) Go to http://checkgzipcompression.com and enter your webpage address in the blank bar and press enter.  You should get “You are blessed GZIP compression is enabled” message if you did everything correctly.

Also, point to be noted if you can’t seem to be able to do it no matter how many times you try then it may be that your host hasn’t enabled GZIP module in the server. Contact your hosting provider for more information.

-If you prefer video tutorial here is the link: Same tutorial in video

GZIP compression successful

Let me make something clear. If you sometimes check if GZIP compression is enabled or not on some other sites. Then some sites might tell you that GZIP compression is not enabled. If this happens to you then don’t panic. Everything is perfectly fine.

For example

I check if GZIP compression is enabled on my site or not onhttps://nixcp.com/tools/gzip-test/ after I checked on http://checkgzipcompression.com and It was showing that GZIP compression is not enabled even though it is enabled and functioning properly.

How To Enable Gzip Compression Via Cpanel Faster Page Load 7

Don’t worry all is well. I don’t know why is this other site showing not enabled.


Is GZIP compression necessary or worth it? Yes, absolutely without any doubt. It compresses all kinds of files on the go and saves you and your visitor’s bandwidth.

On the internet, you only have viewers attention for a couple of seconds. So your site better is fast if you want to keep up. Most important thing is to provide a better user experience if you want to be successful in the blogging scene. Which you can never do if your website takes forever to load.

Did you know that most of the viewers are likely to bounce if your webpage takes more than 3 or 4 seconds? to load.

It doesn’t cost you any money to implement or need a lot of time to implement. It is something you can set up in a couple of minutes. Also set it once and then forget it, it doesn’t need any kind of maintenance.

Hope it provided you with some value. Have a good day.

2 thoughts on “Enable GZIP compression via cPanel, Load your web page super FAST!”

Leave a Comment