Setting up a website sitemap

Website sitemaps help keep search engines in the loop, providing them with a complete list of your website's pages. There are a few different types of sitemap, and this guide gives an overview of those, and how you can set them up.

HTML and XML sitemaps

Sitemaps come as either HTML, and are designed to be human readable, or as XML, which is a language designed for computers to exchange structured information.

HTML sitemaps are old fashioned, and are often linked to from a website footer. While this does allow a visitor to browse through your pages, it's not very user friendly, particularly with hundreds of thousands of pages.

An XML sitemap is intended just for search engines, and is the recommended standard. You can submit your XML sitemap to Google Webmaster Tools, and check it's stats.

Creating a static XML sitemap

Most small websites will benefit from a static sitemap - an XML file created from an index of all the websites pages.

If your website is small you can make a sitemap manually. See this example of a sitemap, and follow the same format for yours.

You can do this quickly if your website uses Windows Server 2008, by using the Search Engine Optimisation module for IIS7.

Plug-ins can be used to create sitemaps for Wordpress, PHPNuke, and other popular content management systems.

Creating a dynamic XML sitemap

If your website uses a database for storing pages, you can create a sitemap which automatically keeps itself up to date. Each time you add a new product or page, your sitemap will update and search engines will find it.

Depending on the technologies your website uses, there may be several ways to create a dynamic sitemap. As I use ASP.NET, my sitemaps are created using LINQ and the XObject class. For details on doing this yourself, just get in touch.

The sitemap standard limits each sitemap to a maximum of 10,000 pages. You can use multiple sitemaps though, and a sitemap index file to link to them all.

robots.txt

As well as submitting your sitemap to Google Webmaster Tools, you should also add a link to it in your robots.txt file. The sitemap standard includes this, to allow a range of other search engines to find your sitemap. Just add the following line to your robots.txt file:

SITEMAP: http://www.example.com/sitemap.xml

Need a hand?

Want a sitemap set up for your website but not sure of the best approach? Just get in touch.

Last updated on 18 July 2010, at 23:57.