Improve load times with your .htaccess file

28 Feb 2011 | written by Joshua Kelson for the internet marketing, SEO section(s)

Improve load times with your .htaccess file

Load times are important, not only for SEO but for the user experience as well.  Here is a tip I have used to improve load times on my sites, especially those with a lot of images. Before we begin, however, I must make a disclaimer. First, this will only be one tip to improve; there are many things you can do on your site that will improve load times. Adjusting your .htaccess file incorrectly can blow up a site, so do a site backup first (I always do this when altering anything) and if you are novice, you may want someone with experience to help you out.

How fast are you?

I would recommend looking at how fast your site currently loads. There are many free tools out there such as webpagetest.org or tools.pingdom.com. If the site loads in under four seconds, I wouldn’t worry too much about it; you’re faster than about 80% of the sites on the web. Even 5-7 seconds isn’t too bad (personally I would improve), though it is crucial to consider what type of connection you are testing with vs. what type of connection most of your traffic is coming from (information typically found in analytics under visitors). What type of connection your users are coming from will help you understand what type of experience they are having on your site. Slow load times lead to lower page views and higher bounce rates, which ultimately leads to less conversions and moola in your pocket. Any improvements help, so if you can make it faster…I say do it.

Image cache

A basic alteration to the .htaccess that can improve load times greatly is altering the image cache values. This is done depending on what type of server you are on, and the following is for an apache server:

ExpiresActive On

ExpiresByType image/gif “now plus 9 years”

ExpiresByType image/png “now plus 9 years”

ExpiresByType image/jpeg “now plus 9 years”

ExpiresByType image/x-icon “now plus 9 years”

This is a basic implementation that should help improve the load time of most sites, improving SEO and user experience.

2 Comments

2 Comments

  • Dan Garfield |   Feb 28th, 2011 at 1:36 pm

    Mike, yeah this would only have the possibility to improve load times after the first page load. I personally would make sure gzip compression was enabled before worrying about turning on caching (a good browser will cache anyway).

  • Mike |   Feb 28th, 2011 at 10:04 am

    Will this help with load time the first time somebody visits the page or just every time after (for 9 years)?

Leave a Reply