Monday, December 28, 2009

Speed Up Your Page 2 - Gzip compression

OK, so almost everyone is familiar with the concept of a "zip file", right? The idea is that if you have to download a packet of information, be it a programme, big pdf, or simply some large image files, then you can compress the data into a smaller file, known as a zip file. This file is much easier and quicker to download, and then you can extract the file or files, using another programme.

A similar concept is available for your website. This is very handy when it comes to the speed of your page, because the majority of people are still using windows internet explorer as their default browser. Chrome is faster, Firefox, Opera and Safari are all much better, with good old IE being the slowest.

Barcelona SEO - Zip close up So, how can the compression work here? Well, it's known as gzip and is a universally known piece of code which you can add to your websites's htaccess file. Basically, when a browser goes to your site, they will look for this indication of whether the site is enabled as a zip, and if it is then fetch it. Your site will work perfectly fine without the gzip compression, but adding the simple piece of code can help a great deal with page loading times, not to mention bandwidth for your server - potentially saving you a load of money.

I have come across a few different snippets of code whilst researching this post (you will know I'm no programmer), but have decided to re-post a snippet of code from a google employee on a help thread. This is the code you need to add to your htaccess file:

# compress the files
AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript application/x-javascript
# removes some bugs
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0[678] no-gzip
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
Header append Vary User-Agent

This includes any bugs which have been known to crop up in Firefox, for example. Try it out, and de-bug in Firebug's pagespeed plugin. Let me know any comments/suggestions in the comments below guys!

Are you trying to make your website better for the search engines? Contact me at Barcelona SEO for a chat about your site. I also offer SEO Training in Barcelona if you'd prefer a more hands on approach.

Tuesday, December 22, 2009

Speed up your page with htaccess file

I mentioned the other week that Google may be beginning to put more importance on page loading times and speeds. There are some handy tools out there to suggest some of the ways you can improve page load times, and therefore the overall speed. I will try and tackle some of these issues, but in a few seperate posts. The reason for this is that personally, I'm not a designer or a programmer, so many of the suggestions I have come across for my own sites and sites that I manage have left me a little stumped, and I have had to research a little. For those of you already competent in HTML, CSS, and other programming elements of websites, this may be all too easy for you!

Page Speeed with htaccess - Barcelona SEO blog

So, first one is your .htaccess file. This is a file stored on your server, and is very often empty. It is a simple text file, so if you need to open the file, you always need to do so in a simple program such as notepad, or something similar - never dreamweaver or Microsoft Word - those programmes have unseen code which can interfere with the file. Some sites I've found talking about the htaccess file mention that if you don't find it on your server, you should ask your hosting company if they will accept such a file. I have to say that I haven't found this to be a problem so far. BUT it's probably better to ask, as it can affect download times for servers, and can therefore affect other sites if you're on a shared server, for example.

So, what's the big deal with the .htaccess file?! Well, before we start, it's always wise (as with anything on your website) to make a back up of anything on your server before you start to modify it. The htaccess file is a file which can isntruct the bots on the search engines with regards 301 redirects, custom error pages, etc. and other such operations as cache of elements, images, etc. This is a big deal for page speed.

So if you have no experience with adding instructions to a htaccess file, then it's fairly simple. Each command needs to be on one line only (so potentially the file can be as long as you need it to be). And like html, each command needs to have a start and end. So, say you want to cache all of your image files, as reccommended by pagespeed on Firefox, which I mentioned in the last post. You need to add this to the htaccess file:

< Files img >
Header set Cache-Control "max-age=29030400, public"
< / Files >

To break it down. The tag of < files > can be followed by a space and then any file extension you have and want to cache.

The following line needs to copied exactly, and basically tells the bot how long to chache the files for. The numbers are in seconds, and those figures represent a year.

If you prefer to cache individual images, then this can also be done, if you need to chage images on your site on a regular basis. Say, for example, your logo never changes (likely), then you can add a line just for the location of your logo.

Obviously don't forget to end the command with < / Files > to close the tag, and remember that each command needs a new line.

If you have any queries, please leave them in the comments. I'll be returning to htaccess again shortly, so come back for more spage speed tips.

Not satisfied with your website? Contact me at Barcelona SEO for a chat about the things we can do. I specialise in Website Optimisation in Barcelona, but can be contacted for any particular site - regardless of the location.

*Please note, due to the built-in html editor in blogger, I have used extra spacing in the tags for clarity.

Friday, December 18, 2009

Advanced Search Queries in Google

Google is making things easier for you to search. Apparently they continuously test the home page (some 41 shades of blue have been tested according to Marissa Mayer) and also this year the search box has been widened, and larger font is used when you type. More recently they've introduced a "fade-in" background (which I'll be honest is a bit odd, but there you go) so as to not distract from the already minimilistic page.

Computer Screen - Barcelona SEO Blog

The majority of people simply type their query in the search box or toolbar, and then google even cleverly suggests the end of the query for you - all to make things easier. However, it can still take a bit of refining before you satify your needs. This is where the advanced paramenters can come in handy. There are a few extra things you can type into the search box to refine your search. Anyone familiar with Google's Adwords will probably know.

For example, using [] to bracket your search gives a broad match to the keywords. It's kind of like the same words you type with no extra symbols before or after, but can often change if you compare both.

Using "" around your search means you want an exact match of the keywords in that order. You can also use the - sign to denote negative keywords you want google to remove from the search results. The minus sign always needs to have a space before and be joined to the word, like this: "Turkey Recipies -Christmas" if you want some great recipies for cooking turkey but not a christmas turkey!! This is good if you know exactly what you're looking for, but can sometimes omit results. Think if you type "George Bush" into google, it won't display any pages where "George W Bush" appears. Get it?

If you want to search a particular website for information, then you can add site: to the query. For example if you want to see news about how Bing is doing in the UK, you can type Bing into the search box, and you'll be only given results from the BBC website. Simiarly, if you only want websites from the UK, then you can type or government pages type and so on.

The * key is a great little tool to use. This is what google calls a "wild card" and will basically fill in the blank for you if you don't know the word you're looking for. Sounds daft? Well, think of something like a football score. If you know the teams playing or who played, then you could type in FC Barcelona * Bayern Munich * which will remind you that the score was 4-0 to Barcelona.

There are more additions to your search query terms you may need to know for SEO, so I might touch on a few more of those in another post, but I think these are a good introduction for the moment. If you're not happy with your website's rankings in the Search Engines, then contact me at Barcelona SEO for a chat. Or if you'd like some one-to-one SEO Training in Barcelona, then I can also help.

Saturday, December 5, 2009

Google's Page Speed Unrealistic?

OK guys, I've been away a while in terms of posting, but had two fairly big projects on, and didn't have much free time!

There has been a fair bit of buzz around the SEO community since Pub Con in Las Vegas last November, when Google's Matt Cutts talked about Page Speed. There have been suggestions that speed of pages, loading times and the like may become a factor in Google's main search algorithm in 2010. This may or may not be true, but whether or not it's 100% true, there's no harm in making your page quicker for your users, right?

I've mentioned previously ways to monitor the performance of your web server, for example in terms of downtime. This is surely a ranking factor - if on a number of occasions googlebot cannot access your page due to server down time, it's unlikely they'll display your results to the users in the serps.

So all of this has prompted some great tools such as Firefox extension Firebug (a must, by the way) and even Google's official blog announcing a new feature within Webmaster Tools to show your site's performance. The tools show a graph, over time, which looks a little like this:

Page Speed - Barcelona SEO

So according to Webmaster Tools, one of my sites is 83% lower than the majority of sites on the web! Wow! That's huge - and it takes 6.7 seconds to load - not too bad, right? But 83% of the sites on the web are quicker than this one, which sounds terrible. However, I think this is perhaps a little bit of an exaggeration on Google's part. For example, UK SEO Team Blogstorm reported that their site was also 86% slower than all other sites. I think I can see a trend developing - even in the comments, you can see the highest seems to be a 66%.

If you check my graph above, you'll see a huge spike mid way through September. This was due to a conflict with the javascript used in the sharethis buttons. This was not letting the page completely load, until you actually hovered over the icons. I also have to say that this was fixed extremely quickly and professionally by the support team. There's still a long way to go before I get into the 20% bracket for example, but it's a head start if things like this will influence any way in the rankings for the coming year.

Are you looking to improve your site's performance in Google and the other search engines? Barcelona SEO can help. I specialise in website optimisation in Barcelona and internationally, and will be happy to chat about your site. Contact me here for more details.