Saturday, March 17, 2007

Sitemaps - make Googlebot aware you have something for it

"The Sitemap Protocol is a dialect of XML for summarizing Sitemap information that is relevant to web crawlers. For each URL, you can include crawl "hints" like the last modified date and approximate change frequency."

There are many SEO techniques you can play with but this one has some important advantages:

  • it's easy to implement
  • shows results in a very short time
  • it's recommended and offered by Google so you won't get blacklisted
The reason you would want to use a Sitemap is that I'm sure you know your website better that Googlebot does. So why not sharing the knowledge and let it know what you think is important and what is not. I used to underestimate the power of sitemaps until I saw this (Googlebot activity spike) a week after creating the Sitemap for my website:



The first time I tried to use sitemaps I got lost in the protocol specifications that Google provides, the fact that Google Sitemap Generator is not as user-friendly as I expected and in the multitude of options you have for submitting your sitemap. Well, it seems that the whole process is simpler that I thought. Here are the only steps you have to follow:

1. Create or generate the sitemap
2. Make sure it is valid
3. Submit it
4. Update it

1. How to create a sitemap?
The following image shows a Sitemap in XML format. The Sitemap in the example contains two URLs, each of which is identified using the XML tag. In this example, a different set of optional parameters has been provided for each URL.


Due the fact that XML files are just text files you can create them by hand or, if you have a more then a dozen URLs, you can generate them using PHP. So, go write a simple "sitemap.xml" file. Even a small sitemap will help. Repeat the <url>...</url> block for each link you want to include and don't forget to close the <urlset> tag at the end of the file.

2. If it's not valid it has no value
The next step is validating your file. And this is a must because XML parsers are less error tolerant than HTML parsers. So if your file has errors it will not be processed. There are plenty of ways to validate your file but the most easy I found is using validome.org. Just upload it to your website and point the validator to it.


3. Let Google know you have a sitemap (or more)
Google has a service called Google Webmaster tools which we will use to upload our sitemap. After you log in (you will need a Google account for that) just go to the Sitemaps section and click "Add a sitemap". Hopefully, if everything is ok you will see something like this after a while:


4. Keep your sitemaps up to date
Your Sitemap is more valuable if it's up to date. That is it points to working URLs and parameters reflect the state of the links. So, don't forget to update them from time to time. This is it, good luck!



No comments: