How-to 9 min read

How to run the Gzip data condensation on the website

For site optimization, switching on the Gzip data condensation is a great solution because the searching systems rank pages with the compressed text rather better. By the way, fast-uploaded pages are more useful for users. To compress the page, activate one of the htaccess modules.

What's the pages Gzip data condensation process?

When the page is opening, browser uploads files with different extension. Gzip-compressing of HTML pages is available for the following file types:

  • .html;
  • .xml;
  • .js;
  • .css.

The bigger is file, the longer content will be uploading. If you run the data condensation process, servers will need less time to process it. The server gives files in the compressed form, and the browser unpacks them and shows it in the full form on display.

Search systems index sites with compressed data better. The transferring data in this way means faster page loading, and as a result, the user doesn't need to wait. So the file submission in compressed form has a positive effect on a search systems ranking and users' loyalty to the online project.

How to check Gzip data condensation availability on the site?

Some hosting providers include default information compressing for all customers despite the server uploading. On the sites constructed by WordPress, the content of pages is also compressed. You can use the online services to check the availability of compressing technology of your site with the help of CMS or hosting. For example, GidZipTest:
Testing GZIP compression of the site on GidZipTest
As you can see, the content compression reaches 73,2%. If the data condensation procedure isn't used, you will see «No» in the first line, and the file size remains the same.
Checking the GZIP compression of the page
You can use the Google tool PageSpeed Insights to check the speed of site loading online. After analyzing, the server gives some advice to increase the loading speed. Usually, there is an advice for an efficient compressing procedure to run:
How to enable text compressing
Using this and similar online tools, you can check the level of Gzip data condensation on the OpenCart sites and other website engine versions. You do not have to neglect the recommendation to compress the content because it influences directly to the SEO promotion and namely to the wish of users to stay on the site longer.

For a maximum efficiency, one compression is not enough. It must be combined with other ways of reducing the total weight of the website pages:

  • using .gif, .jpeg, .png forms of images according to their type;
  • using the technology of caching;
  • reducing the .css и .js files;
  • adding .css files to the beginning of the page and .js – to the end;
  • reducing the HTTP-queries.

All these ways at once will reduce the page weight, increase the loading speed, and will positively affect website ranking.

How to run the Gzip data condensation procedure in Apache

The compressing content may be dynamic and static. In the first variant, data is compressed by the server when the data is sent to the browser. The page has less weight, and faster loading are advantages in this case.

The main disadvantage is the server's overload. The hosting resources cannot operate high traffic sites. You have to pay more expensive tariffs or just change the provider. To compress data with the help of Apache, you should add an element of code into the file htaccess. You can find access to this code only in the admin panel of the hosting or in any FTP client:
Switching on GZIP compression on Apache
After the file is opened, activate the mod_deflate module by adding the following command:
mod_deflate Apache
After the code is saved, analyze the site loading speed again. This procedure will show if there is a lack of compression. In such a case, you should find the problem in the server. Some providers use the mix of Apache and Nginx services. In this situation, it is impossible to make a compression on your own. You should ask for help hosting providers` customer service representatives.

If you cannot cope with the problem using mod_deflate, try to use another mod_gzip module. To do this, add commands to the htaccess file:
mod_gzip Apache
Check the module operativity.

Static compression is different from the dynamic one in the lack of server load. You compress each file of your interest yourself and upload them to the root folder of the website. After that, the server will send data to the browser in compressed form. You don't need to buy more expensive tariff acting this way. But after the files are updated, you need to make compressed copies manually.

To plug a static compress, upload on the computer all the files of the form you need by using a file manager or a hosting panel. Then download a 7-zip. Find every file with the help of the offered program, click on the right mouse button, and add them to the archive:
Static GZIP condensation
Choose the necessary form and click «Save»:
GZIP compression in 7-Zip archive
After all archives having been created, upload compressed versions to the root folder. Actually, there will be compressed and uncompressed files. To activate a static compression, plug mod_rewrite module to the htaccess:
Static compression using mod_rewrite in htaccess
You have to use only one type of compression – dynamic or static. If you plug two types at the same time, no one of them will not work. After adding each module, you have to inspect the site loading speed and compressed content presence.

How to run the Gzip data condensation on the Nginx and on other servers?

To determine the type of server your site is located, you can use the admin panel of hosting or ask the hosting provider`s customer service. If your site is located on the Nginx server, you must write a following fragment into the /etc/nginx/nginx.conf file:
http {
# Gzip Settings
gzip on;
gzip_disable "msie6";
gzip_vary on;
gzip_proxied any;
gzip_comp_level 6;
gzip_buffers 16 8k;
gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript;
Then you have to restart the server.

If your site is located on Beget, IspManager, and you couldn't compress files by adding a fragment of the code to the htaccess, ask hosting customer service to switch on the compressing option on the server.

How to increase the speed of site loading in WordPress?

To run a Gzip data condensation procedure in WordPress, you can also use plugins. For example, there is a function «Compressing» in the Hyper Cache:
GZIP compression plugin for WordPress Hyper Cache
While you activate this function, you don't need to plug modules with the help of htaccess file.


The technology of Gzip data condensation for increasing site loading speed is used in the complex with other actions. Using compressed data makes users more loyal. It also helps to improve the positions of the site in search. You can check the compression by means of online services. For plugin, you can use static or dynamic compression.

In the first variant, you must create Gzip archives manually and reduce with the help of this action the server total loading. In the second variant, you can just plug a module to the htaccess file and again check compression of Gzip pages. If these changes are unsuccessful, you have to call hosting provider customer service and get informative recommendations.
This article is a part of Serpstat's "Site Audit" tool
SEO Audit in Serpstat" title = "How to run the Gzip data condensation on the website 16261788360507" />
Audit all the site or page in one click. A complete list of errors, sorted by severity, ways to resolve them and recommendations. Any frequency of verification and automatic email reports.
Run Site Audit

Speed up your search marketing growth with Serpstat!

Keyword and backlink opportunities, competitors' online strategy, daily rankings and SEO-related issues.

A pack of tools for reducing your time on SEO tasks.

Get free 7-day trial

Rate the article on a five-point scale

The article has already been rated by 0 people on average out of 5
Found an error? Select it and press Ctrl + Enter to tell us

Share this article with your friends

Are you sure?

Introducing Serpstat

Find out about the main features of the service in a convenient way for you!

Please send a request, and our specialist will offer you education options: a personal demonstration, a trial period, or materials for self-study and increasing expertise — everything for a comfortable start to work with Serpstat.




We are glad of your comment
I agree to Serpstat`s Privacy Policy.

Thank you, we have saved your new mailing settings.

Report a bug

Open support chat
mail pocket flipboard Messenger telegramm