Archive for April, 2011
Speeding up Your Website for SEO
Thursday, April 28th, 2011
Faster is Better. My 1980 Honda CB750 with modifications for speed and style.
Google apparently has begun looking at page speed/load times as a ranking factor in the search results. So if you want to stay competitive with your SEO, speeding up your site can help you keep a technical edge over your competition. Especially in the realm of local small businesses who’s websites I often find full of bloated redundant code and hosted on slower shared server environments. Short of paying exorbitant hosting bills to be on the most skookum dedicated server on the market and a complete web design overhaul by a coder with HTML and CSS compliance mastery these are a few things I do to get some serious speed increases.
Improved load times also leads to happier site visitors who tend to stick around longer and view a few more pages of the site, potentially leading to higher conversion rates.
Get Your Current Baseline Speed
Pingdom’s Full Page Test tool tracks how long it takes to upload all parts of a web page. The image files, the HTML files, the CSS and JavaScript files, etc…. It will break them all down and show load sequence and times for each element and report the total byte sizes for each element. Great for spotting a few trouble spots – like an image file that’s a little too big.
Get Google’s Speed Tips for your Site
The new page speed labs tool will do a quick analysis of where you could (not necessarily can) speed things up. Depending on your hosting environment you may not be able to implement all the suggestions.
Minify Your CSS Files
Your styles are on separate stylesheet files, correct? If they are sitting as code in the head of your HTML files, get them off of there and onto their own style sheet. That’s just sloppy lazy coding. When the CSS exists on your pages you are essentially reloading that same code again and again each time a user visits another page of the site. Instead, if it was in a separate CSS file and that file was called from the page head, the web browser loads the file once and applies it again and again to each page as the user peruses through the site. Separate style sheet files alone are a significant speed improvement, but the files themselves can often be minimized quite a bit.
CSS is white space independent, or most of it is. So when you see this;
#content p {
margin: 5px 0;
padding: 0;
font-weight: normal;
text-align: left;
}
It can be expressed like this as well;
#content p{margin:5px 0;padding:0;font-weight:normal;text-align:left}
That alone removed 5 carriage returns (line-breaks) and 4 tab spaces, and notice we removed the last semi-colon as it’s redundant when that set of styles is closed with the squiggly bracket. As well we removed the space after each colon separator. We saved 14 bytes of data. Do that across an entire stylesheet and you can save a few hundred bytes.
You can run your stylesheets through this CSS minifying tool and it has lots of options on how far you want to take the minimization’s. From it’s default settings I turn on the “Remove last ;”. If I want to maintain some level of readability I’ll choose the “High (moderate readability, smaller size)” compression level. Or If I don’t care about readability I’ll choose the Highest setting.
Keep an un-touched copy of your CSS files just in case. If you ever need to edit your CSS file, edit your stored untouched copy then later run it through the minify process again and use that to update the file on the web server.
Minify Your JavaScript Files
JavaScript is also white-space independent. You don’t need all those line breaks and indentation. That’s only there to make the code more readable by humans. It can all exist in one line. Stripping out all the white space can save you 15% to 20% on file sizes there. Besides, most JavaScript will never see an edit again once its been put into action on the site. Minify and forget.
I use this tool to clean up my JavaScript files – JavaScript Compressor.
Do keep an un-touched copy of your js files just in case.
Heck, Minify your Google Analytics Code Too
Google dishes out it’s Analytics code with line breaks and spaces. I take the code, paste it to a basic text editor then put my backspace button to work and remove the line breaks and extra spaces, turning the code into one single line. Or pop it through the js minify tool above.
Use Google’s new asynchronous code. It’s a speed improvement in itself. In the past I always placed analytics code at the bottom of pages. With the old Analytics code, if Google’s server were slow to respond, and you had the code high in the page, your site would hang, waiting for Google, before loading your HTML. So placing the code at the bottom ensured you pages would load first and if the GA code had any hiccups or hangups the user was none the wiser. But the new asynchronous code will let your pages continue to load while GA is busy doing its thing, and that new Asynchronous code needs to be up in your document head anyways.
Optimize Images
Images can take up the bulk of the data pushed for your pages. Optimizing (minimizing file size) can go a long way to speeding things up.
Choose the Optimum File Type
Photographs need to be jpeg’s. Graphics (logo’s, buttons, background gradients, etc…), for the most part, can be gif’s or png’s.
Size Images Properly
Re-size and crop your images to the sizes you want them to appear on your website.
For jpeg photographs, if you wanted the image to be 500 pixels wide on your page, re-size the image to 500 pixels then save that to the server. Do not use your large 3000px wide image straight from your digital camera then use HTML sizing (img=”file.jpg” width=”500″ height=”300″) to size it in the browser. You are still pushing a huge image file over the web, eating lots of bandwidth and taking much longer times to load your page. If you still wanted users to be able to view the full sized image, place a shrunken version on the page and have it link separately to the full image, should the user wish to click to view it.
Gif and png graphics should be cropped to their minimum size needed. Don’t keep added white space around them for spacing purposes. Use CSS for that. Repeating background elements can often get sliced to a single pixel in width, making for very tiny files.
Compress Images for the Web
Most your jpeg photographs can be compressed down to a lower image quality without much noticeable loss in quality, to the human eye at least. I use Photoshop for image manipulation. In that software, after I’ve cropped and re-sized the image to what I want, I choose the “Save for Web” option. Select jpeg, then set the image quality to 70%. This effectively blurs the image out a bit, but not so much that the eye can detect it on a computer screen. Some say you can safely go down to 60%, some say 50%. That may depend on the actual image at hand. Photoshop lets you preview the image at the lower quality level before you save it, so play with the percentages if you wish. Do rename your file before you save the optimized version, else you’ll loose your original full quality image.
Control Browser Caching
Web browsers will store copies of HTML files, stylesheets and images onto the visitors computer. You can control this behavior by setting cache expiry dates and which files to cache. In the interest of speed you can tell the browser to cache everything – css, jpeg, js, html, etc… and set the cache expiry times. The Google Page Speed tool recommends caches dates of at least 14 days (2 weeks). For many small business websites, where nothing really changes that often on the site, you can probably bump that up to a month.
On an Apache server you can add these lines to your .htaccess file to activate the headers and expiry modules and set the cache periods you desire;
<IfModule mod_headers.c> <FilesMatch "\.(ico|gif|jpg|jpeg|png|flv|pdf|swf|mov|mp3|wmv|ppt)$"> ExpiresDefault A2419200 Header append Cache-Control "public" </FilesMatch> <FilesMatch "\.(html|htm)$"> Header set Cache-Control "max-age=1209600, must-revalidate" </FilesMatch> <FilesMatch "\.(js|css|xml|gz)$"> Header append Vary Accept-Encoding </FilesMatch> </IfModule> <IfModule mod_expires.c> ExpiresActive On ExpiresDefault A1209600 ExpiresByType image/gif A2419200 ExpiresByType image/png A2419200 ExpiresByType image/jpeg A2419200 ExpiresByType image/x-icon A2419200 ExpiresByType application/x-javascript A2419200 ExpiresByType text/css A2419200 ExpiresByType text/html A1209600 </IfModule>
Note: 2419200 = 28 days & 1209600 = 14 days.
The if statements let Apache only use those mods if they have been installed on the server. You can add them without the if’s, but if those modules are not installed the site may throw an internal server error. Not too many shared hosting environments will have these modules installed though.
PHP to the Rescue
If your server does not have the above modules installed you can get some cache control headers sent via PHP scripting instead. However it will only apply to your HTML and not images, css and js files (there is a way, with output buffering, to get PHP to set headers on your .css and .js files, but it’s too involved for my purposes, so I skip it).
Place this PHP code at the top of your pages. It must be placed above any other output else you’ll get Headers already sent errors.
<?php
Header("Cache-Control: must-revalidate");
$offset = 60 * 60 * 24 * 28;
$ExpStr = "Expires: " . gmdate("D, d M Y H:i:s", time() + $offset) . " GMT";
Header($ExpStr);
?>
The offset variable is calculating time by seconds, minutes, hours and days where the above example is set to 28 days. If you want a shorter or longer cache period just change the number of days.
For more detail on controling browser Caches check this out. As well Google has some caching best practices here.
Serve Compressed Files through Gzip
Enabling Gzip compression of your files can compress things by up to 80% making for blazing fast load times. Pretty well all modern web browsers will decompress gzipped files. Again many shared hosting services will not have the Gzip modules installed in Apache but if they do you can add this to your .htaccess file to make use of it;
<IfModule mod_gzip.c>
mod_gzip_on Yes
mod_gzip_dechunk Yes
mod_gzip_item_include file \.(html?|txt|css|js|php|pl)$
mod_gzip_item_include handler ^cgi-script$
mod_gzip_item_include mime ^text/.*
mod_gzip_item_include mime ^application/x-javascript.*
mod_gzip_item_exclude mime ^image/.*
mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.*
</IfModule>
With the server software doing the compression, if that module is installed on the server, it will zip not just your HTML but also your CSS and JavaScript files. You typically don’t want to compress image files as they already have their own sorts of compression going on. I think I read somewhere you shouldn’t compress PDF files either, but I can’t recall where I might have saw that.
PHP can Save You Again
You can also achieve gzip compression on your HTML files with PHP. At the top of your pages place this line of code;
<?php ob_start("ob_gzhandler"); ?>
That’ll compress your HTML on the fly and serve up your pages in gzip format. It won’t however be compressing your CSS and Javascript files. There is a way with PHP to get it to convert your .css and .js files to PHP, then compress them and serve them again as .css and .js to the browser, but again is too involved for my tastes. Just compressing the HTML alone can cut things by up to 70%.
After installing compression run your page through this tool to test if it is actually sending gziped content.
Be careful with using output buffering (ob_start) though. If other portions of PHP scripts are also using output buffering it can cause conflicts. For example, if you try to add it to a Wordpress theme, at the top of the header.php file, and you are using a plugin like All in One SEO Pack (AiOSEO), you will discover those problems. AiOSEO does not play nice with buffers that start before it does and you will loose your customized page titles.
After hours of trying to flush buffers at different points of the script, of trying to alter the AiOSEO script files themselves, etc… I did eventually find a solution. Instead of placing it at the beginning of the theme files, skip the theme and place it at the beginning of the main index.php file in the root wordpress folder. It works! But beware that the next time you update the WP core files (and that will be what? next week? grrrrrrrr WP updates suck) the index.php file will get overwritten and you will loose your gzip customization. Just remember to put that code back in place again after you update WP.
There is More You Can Do
The above are what I currently do, but there is still more that can be done to juice a bit more speed out of a website. Some of it requires having more control over the web server you are hosted on, and for most small business websites on shared hosting environments, like the local SEO clients I work with, that’s usually not possible.
But if you do have admin control of the server and can add Apache modules and customize settings you might want to check out Google’s mod_pagespeed Apache module. It will minify your .css, .js, and .html files on the fly, allowing you to keep the human readable versions on the server. It’ll also do some additional optimization to .jpeg and .png files and it will extend caching. It’ll also take older Google Analytics code and convert it to the new Asynchronous code. And it’ll even rewrite portions of your HTML to omit unnecessary attributes when they are already set to defaults and rewrite URLs to shortened relative paths where appropriate. Use this mod combined with caching and compression and you’ll have one of the fastest websites on the planet.
For more info on speed, Yahoo has a great write-up on the various things you can do to speed up websites here.
Yes, that is my motorcycle at the top of the page. You can read more about this cafe racer and its modifications here.
Do Google Places Listings Really Matter?
Friday, April 1st, 2011I’ve noticed, for many cases, if you have great organic rankings for your local terms having the additional visuals of a map marker, logo image, and address/phone info, plus maybe star ratings, review snippets and review counts, from a Google Places listing, does not matter at all.
I have a certain LONG term client (5 years) and have seen all the various iterations of Google Maps and Places mixed into the search results. From 10-packs to 7-packs and today’s blended local organic listings. This client has enjoyed #1 organic rankings for their primary local terms through most of that time (maybe the odd short term dip to #2). But here’s the kicker – they are located just outside the city limits. This tends to restrict a number of things as far as Google Places listings and rankings go.
Here are the various changes to Google results they’ve witnessed over the past 5 years;
- Before Google started showing map listings in the SERPS, they were #1 organic.
- When the 10-pack local listings rolled out they were #1 organic but below the 10-pack and map.
- For a while (most of 2009 and early part of 2010) we were able to trick Google into thinking they were in the city and they showed #A in the 7-pack and again #1 organic below the map.
- Later Google caught on to our trick and they got kicked out of 7-pack but still showed at #1 organic below the map.
- New blended local organic results now has them at #1 above any of the local listings that get the bonus map markers and such.
What do you think we saw for changes in traffic to the website and changes in lead volumes (we track email leads as goal conversions in Analytics) through each of those significant changes?
Answer = none.
By none I mean nothing that could by any means be attributed to places listings vs. no places listings. What we did see was year over year growth in traffic and leads (look at the peaks in the image below – this is a very seasonal business). We attribute that to the growth of the internet and search in general as a source to find local businesses.

Traffic (filtered for local city name) and Email Lead Conversions - 2007 to 2011. Yellow bars are main season for this business. Click to view full size.
You would think that there should have been a noticeable difference between being in the 7 pack noticeably above the organic results and being only in the organic listings below the map. But it simply is not the case.
Now the peak for 2010 was not much different than 2009. Could that peak have been higher if the business was located in the city limits, or we managed to still convince Google it was, and we continued to show up in the local 7-pack? To check against that I checked their primary local term in Google Insights for historical traffic trends. You’ll see 2009 and 2010 at about the same levels there as well.

Total available traffic for primary local search term as shown by Google Insights
One Small Difference
Primary Service Term with No Location Qualifier
If you search certain broad terms like dentist, pizza, plumber, etc.., Google recognizes it as the type of query that may have local intent and will mix in map results with the broad organic results. Without a true local presence in the city we now miss out on that traffic. But it is small, puny even.
For the year + we had the spoofed (sort of) local presence and high map rankings, the volume of traffic from the singular terms was about 1/10th of those that included that word plus the city name before or after. Plus there is the other iterations that use city names with state or province abbreviations as well as those that use ‘in’ city-name, ‘near’ city name, etc… Combine all the other search terms for their various related services, with a city name in the phrase, and the singular broad terms amount to close to 1/100th of their local traffic.
Another thing about the insignificance of the single word terms, conversion rates (email leads) were a mere fraction as well. Terms that included the city name convert at 8% to 15%. Single word searches on their 2 primary service type variations, converted at 0.39% and 0.64% respectively.
Goodbye single phrase terms with pseudo-local intent – we don’t really miss you.
Hold On, Not So Fast!
I have other clients ranking well organically for areas they don’t get local map listings – they pretty much see the same thing. But for some industries the pull of the map is a little bit more noticeable.
People have slightly different intents when searching certain local businesses. Those industries where need tends to be urgent – “I need it now and I don’t care who it is, just get it done, NOW” – see a slightly different trend.
I’ve worked with a number of plumbers in various cities and they all tell me the same thing. Searchers are looking for phone numbers and simply start “dialing for dollars”. They have a leaky pipe that’s about to ruin their flooring and they want a fix now. First plumber to answer the phone gets the business, not the guy who can’t answer his cell while elbow deep into a toilet. They can’t even be bothered to leave a message on voice mail. Instead they hang up and call the next plumber on the list.
Google Maps/Places listings show phone numbers quite prominently, so in those urgent cases the Places listing in the search results matters more. But that can be overcome with good organic rankings too. Simply include a phone number in your title tags, and/or meta description tags.
Reviews Can Matter, Sometimes
Blended local search results are sometimes displaying snippets of reviews right there on page one. They can have an impact, in extreme cases. By extreme I mean a glaringly negative review showing as the review snippet. Right there, page 1.
From the perspective of what a user see’s in the search results, things like positive review snippets, review counts, rating stars, etc.. have little impact on click through’s to the website and phone calls. It primarily comes down to rankings. But one bad review, for all to see, can have a dramatic impact – but not on traffic to the site. It impacts lead volumes – both phone calls and emails.
A client in New York City had that dilemma with a false negative review being pulled from Yelp. The bad review showed on page one of Google search for close to two months and during that period lead volume dropped by 75% (phone calls saw a bigger impact than email) but no discernible change in total traffic to the website.

The impact from one bad review showing in Google Search results
Seems that rankings still pulled the clicks as they usually do but people chose not to contact them. Obviously because of the review they saw in the search results. Based on the content of that review we could tell it was either an intentional fake from a competitor or a mistake on the reviewers part mixing them up with some other business.
We posted a business owner response to that review, similar to what this dentist did, and a couple weeks later Yelp ended up placing the bad one as a filtered review and Google then scrapped a different one to show as a snippet. Lead volumes are shooting back up to normal levels. Needless to say, my client is breathing a sigh of relief.
In general terms, organic rankings trumps all and the extra fluff of review snippets, star ratings, review counts are just that -fluff (unless it’s glaringly negative). I wonder then, at the mass user level, what they actually think of those extras.
- Is it merely a little side bonus that might, for some users in some cases, maybe, maybe, maybe influence a decision?
- Is there a lack of trust for user reviews that are easy to fake and have little to no quality control?
- Do they ultimately put more trust in the ranking algorithm, regardless of stars and reviews?




