An XML sitemap is a big thing nowadays in the world of SEO and websites. What you do with this is help out the search engines by telling them what pages to spider. In return you get a lot of juicy features for your site. Think of it as like a Search Engine Control Panel, well in Googles case at least.
The first thing you will need is an xml file that houses all of your site’s page URL’s there are many generators that you can use for this, Links to these can be found at the bottom of the page.
The Basic XML Sitemap
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>http://www.shanedj.com/</loc>
<lastmod>2005-12-12</lastmod>
<changefreq>weekly</changefreq>
<priority>1.0</priority>
</url>
<url>
<loc>http://www.shanedj.com/blog/</loc>
<lastmod>2008-12-12</lastmod>
<changefreq>daily</changefreq>
<priority>0.8</priority>
</url>
</urlset>
For each page on your site you need a <url> block this must contain the <loc> tag as this is a requirement of the XML sitemaps protocol. <loc> is the full URL of your page and must be less than 2048charachters in length.
Optional XML Sitemap Components
<lastmod>, <changefreq> and <priority> are optional tags that you can have within the <url> tag. <lastmod> is the date the page was last modified. This needs to be in the format YYYY-MM-DD. <changefreq> is how how often you think the page is likely to change. This will not mean the spider will come dependent on what you put here tho. Values you should put in here are:
- always
- hourly
- daily
- weekly
- monthly
- yearly
- never
The sitemap.org site declares that you should put this in as a ‘hint’ and not a command. Lastly there is the <priority> tag, in this we enter a number from 0.0 to 1.0. What I normally do with the priority is assign 1st level pages as 1.0, second level pages as 0.8 and so on defendant on the depth of your sites structure.
Ideally you want to try to include all of your URL’s that are in your site. And make sure that you include your url and priority as a minimum. Search engines can get the <lastmod> data from your server if it has been set up correctly.
You don’t really want to be hand typing these sitemaps. You could be there for days. Below there are some tools that can automatically spider and generate your file for you. The 2 tools below are free to use and very easy to use indeed. When you have created the file you need to save it somewhere on your website.
Getting your Sitemap XML Noticed
The most easiest way to make sure your XML Sitemap gets noticed is to add a line to your robots.txt file in the root of your server. If you don’t have one there then you should, this is the first file a spider will look at when it hits your site. The line you need to add in here is
Sitemap: http://www.domain.com/location-to-sitemap.xml
This pretty much covers all search engines that use the sitemap protocol. ALthough this way you will not get access to the information located in the webmaster consoles. To do that you need to get an account on Google, Yahoo and MSN verify your site and add your sitemap that way.
Sitemap XML Resources
Sitemap XML Creation Tools
http://www.xml-sitemaps.com/
http://www.auditmypc.com/free-sitemap-generator.asp
Webmaster Consoles
http://www.google.com/webmasters/tools/
https://siteexplorer.search.yahoo.com/
http://webmaster.live.com/
Shane