How Using GZIP Compression Helps Your Site's SEO
Published July 18, 2010
You might have heard some talk about how compressing your web pages helps with your site’s SEO, but how does it help and how can you use it on your site? This article will provide you with some details on what file compression is and why it’s essential to the process of optimizing your site.
What is File Compression and Why is it Important for SEO?
When you click on a link and a web page comes up in your browser, there are a few steps which take place in order for that page to become visible to you. First, your browser (internet explorer, firefox etc) sends a request to the web server (the computer where a website’s files are stored). If the browser and the web server were people, that request would sound something like this:
“Hey web server for ‘www.example.com,’ this is Joe’s internet browser. Joe is asking for the home page ‘www.example.com,’ please send me the file for that page so that I can show it to Joe.”
The next step would be the web server searching for the file ‘http://www.example.com,’ reading it and responding by sending that page to Joe’s browser. Once Joe’s browser receives the page, Joe would be able to view the page by looking at his computer screen.
The faster these steps take place, the faster the page is loaded into Joe’s browser and the less time Joe has wait for that page to “load.” Web page load time is becoming more and more important to the search engines when it comes to determining how well optimized a website is. This is because sites with longer load times require users to wait longer while sites with faster load times require less waiting time.
Since web users like to get what they want quickly, this means that the faster your site loads, the more user friendly it will be and the more the search engines will like it. The problem is that the larger your web pages are, the more time it takes the web server to read the information in the file and send it over to the browser so that the page can be viewed.
This means Joe has to wait longer for the page to load, and since Joe (like the rest of us) does not like waiting, there’s a chance he’ll just abandon the process and move on to a site which will give him what he wants faster. However, with file compression like GZIP, you can reduce the size of your web page files by up to 70%, which equals faster loading time and a happier Joe…which in the end equals better status with the search engines.
You accomplish this by setting up a “zipped” or compressed version of the file on your server side, which is smaller and therefore takes less time to send over to your user’s browser. The file is then decompressed or “unpacked” quickly on the user’s side, resulting in a faster file transfer.
Options for File Compression: Deflate or GZIP
Your two options for file compression are Deflate and GZIP. Deflate is an option which comes automatically with the Apache server and which is simple to set up. GZIP on the other hand needs to be installed and requires a bit more work to install. However, GZIP does achieve a higher compression rate and therefore might be a better choice if your website uses pages which have a lot of images or large file sizes.
On the other hand, if your site has over 1,000 unique visitors a day, deflate is actually a better selection because it requires much less energy to compress files, which means your high volume of visitors won’t slow down your site due to the increase in GZIP compression.
On the other hand, if your site has over 1,000 unique visitors a day, deflate is actually a better selection because it requires much less energy to compress files, which means your high volume of visitors won’t slow down your site due to the increase in GZIP compression.
Setting up File Compression with Deflate
Setting up file compression for your website will depend on which type of server you’re using for your website. Most likely, you’ll be using Apache, which means you can enable compression by adding a few deflate codes to your .htaccess file. This file can be found by accessing your websites control and command (CNC) panel and is located in your main directory. For example, if your site was http://www.example.com, your .htaccess file would be in this location:
http://www.example.com/.htaccess
Just keep in mind that you won’t be able to view your .htaccess file simply by typing this URL into your browser. You have to access the file location through your CNC panel. Then, you simply add the codes to your .htaccess file which will compress your site’s files by types. For example, if you want to compress all of the .txt and HTML files on your site:
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html
-Other codes can be added to the .htaccess file to compress your .xml files:
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/rss+xml
-Finally, the following codes can be added to compress your .css and javascript:
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript
-The other option is to select only certain file types on your website using the following command in your .htaccess file:
<Files *.html>
SetOutputFilter DEFLATE
</Files>
-Notice here that you’re choosing to compress all html files (the * character is a wild card code that stands for “all”). You could also choose to only compress .xml files and .css files:
<Files *.css>
SetOutputFilter DEFLATE
</Files>
If you don’t care to follow the above instructions for compressing your files or if you opt for using GZIP, you can hire a web programmer to take care of it. The job will take less than an hour and it’s usually best if you outsource this job along with a few other small web programming tasks such as optimizing your meta data or creating a robots.txt file.
Verify Your File Compression Codes
Once you have added the compression codes to your .htaccess (or had your web programmer do it), you can verify that the compression codes are working by simply type your URL into our site checking tool. Here, you’ll also find information about how well your site is optimized in regard to: meta data, keyword density, incoming links and much more.
To gain access to the most up-to-date SEO strategies, fill out the form below to sign up for our newsletter. This newsletter will help you know what Google's up to as well as how you can get your website ranking higher without raising any red flags.
{"http://www.seositecheckup.com/articles/85":{"data":[]}}
Read Related Articles About SEO Programming Topics
- How to Protect Your Website From Hackers and Cyberthugs
In a perfect world, you'd be able to mind your own business and cheerfully run a successful online business without being harassed by "cyberthugs." However, until that perfect world comes, you'll need to slap great big KEEP OUT sign on your website. This means creating security settings which will disallow access to sensitive data and controls. - How External CSS Style Sheets and External Javascript Files Can Boost Your Rankings
If you’re searching for some simple ways to increase your ranking with the search engines and provide visitors with a better user experience, external CSS style sheets and external JavaScript files might just be the answer you’re looking for. As search engine companies such as Yahoo, MSN and Google continue to consider page loading speed an important factor in determining the ranking of a website, the need to reduce load times becomes more and more important. This can be accomplished through file compression strategies such as GZIP and deflation and by optimizing graphics file sizes. - How Page Caching Optimizes Your Site Performance
Page caching is another method which can help you to improve the load time of your web pages and thus optimize your site for the search engines. Page load time can significantly impact your user experience and your site?s ability into convert visitors into buyers or into leads. In fact, experiments at Google have revealed that just a half second?s difference in load times can cause up to a 20% reduction in web traffic. - Static Links vs. Dynamic Links: Which Are Best for SEO?
Learn about the pros and cons behind static links and dynamic links, as well as which one is best for your SEO efforts. - Correct Your URL Canonicalization
Learn about URL Canonicalization, what it is, why it is important, and how to address this for your website. - Some Guidelines for Determining Web Page and File Size
Web page size is an important factor in determining how well optimized your site is. Search engines like MSN, Yahoo and Google are considering load time to be more and more important when it comes to both search engine optimization and PPC quality scores, and file size certainly effects your website’s load time. - Why You Need A Sitemap Protocol As Part of Your SEO
Learn about how powerful a Sitemap Protocol is in enhancing your website's search engine optimization. - How to Focus Your Content and Site Structure for Maximum SERP Results
What does the future of SEO hold? Will back links, fresh content or site structure be most important for ranking high in the search engine's? Find out what Google, MSN and Yahoo! have in mind... - SEO for Wordpress: Optimizing Your Blog With Wordpress Plug ins
A simple step by step game plan for boosting the SEO of your Wordpress blog, optimizing traffic flow and increasing visitor interactions. - The Importance of Avoiding the Use of Nested Tables
Learn about why you should avoid utilizing nested tables in your web pages from both SEO and browsing perspectives. - The Importance of a Robots.txt File for Your SEO
Your Robots.txt file is what tells the search engines which pages to access and index on your website on which pages not to. For example, if you specify in your Robots.txt file that you don't want the search engines to be able to access your thank you page... - Understanding Javascript Redirects
Learn how javascript redirects work, when they are used, and better alternatives for redirecting users. - Finding a Good Ecommerce System for Your Site
Learn exactly what you need to know to find the perfect e-commerce system for selling products and services from your website or blog...
All Categories:
- Basic SEO (19 articles)
- Online Marketing Tips (18 articles)
- On Page SEO (22 articles)
- Off Page SEO (13 articles)
- Social Media Marketing (12 articles)
- Seo Product Reviews (4 articles)
- SEO News (6 articles)
- SEO Content Creation (14 articles)
- How to Avoid SEO Pitfalls (9 articles)
- SEO Outsourcing (6 articles)
- How to Get More Traffic (10 articles)
- Advanced SEO Strategies (2 articles)
