How to create gzip compression on your website?

Now-a-days gzip compression is a must on your website to load the web pages faster. Now how to create gzip compression on your website? Its simple! Read on…!

Enabling Gzip compression can help you to achieve up to 50 – 75% less bandwidth than servers without Gzip. This tool supports Gzip compression from mod_deflate, mod_gzip or gzip compression through PHP and other server side programming languages.

First step is know the type of hosting account you have? If you don’t know this, its ok. Generally, large number of websites are hosted on Linux server. So here we shall assume that you have one such hosting account. Well we shall try with it!

Follow the procedure to create gzip

  • First go to your hosting account and then to File Manager.
  • At the root of your public_html folder, you will find .htaccess file.
  • Right click on the file and open it in either “Code Edit” or “HTML Edit” mode.
  • If you have WordPress on your site, you will see something like the following code in it.
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
  • Now copy this code below the # END WordPress tag in your .htaccess file.
AddOutputFilterByType DEFLATE text/text text/html text/plain text/xml text/css application/x-javascript application/javascript
  • Save the file and that’s all…!
  • Now the question is, whether this gzip compression is really applied on your site?
  • Well, you can check it on this link for our site and then for your site, too.
  • Just enter your web address and hit enter on the link.
  • Bless you…!!
Our website has 74% gzip compression with great speed
Our website has 74% gzip compression with great speed

11 thoughts on “How to create gzip compression on your website?”

    1. Dear Shreyash,
      Since your website is hosted on FREE SERVER of WP, you don’t have to do the GZIP compression. Its already done by WordPress people for you. This article which I wrote here, is for those website, like Vidyasagar Academy, which is hosted independent and dedicated Linux servers.
      You need to purchase such server first and then do the GZIP.
      But your FREE website is already gzipped. Click this link to check.

    2. Put one comment on Ram Ghongde’s website and when he will reply, you will see his gravatar with a photo.
      Have you created your own gravatar?

  1. i was only able to understand that 30769 was reduced to 8032 and yes it turns out to be nearly 36.1% wonderful compression. Thanks.

Comments are closed.