Sitemap Protocol
When you are developing an internet facing SharePoint site you want search engines too completely and correctly crawl your site. A sitemap protocol (xml sitemap) can help you with that problem. A Sitemap Protocol allows you to inform a search engine about the available urls (pages) on your website that need to be crawled. In simple words it is an xml file with all the urls off your website. When you would like to implement this you have to make the file available in the root off your website. I hear you asking how a sitemap.xml looks like, so here is an example:
<?xml version="1.0" encoding="UTF-8"?> <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"> <url> <loc>http://www.example.com/</loc> <lastmod>2005-01-01</lastmod> <changefreq>monthly</changefreq> <priority>0.8</priority> </url> </urlset>
More information about a sitemap.xml file can be found here:
But how can you implement this in SharePoint. I think that there are two integration possibilities (If you know more please let me know):
- HttpHandler:That generates the xml file on request. An example of this implementation can be found here: Solution. With this solution you can have a sitemap.xml for each site collection you have in a web application
- TimerJob:A custom timer job that generates a new sitemap.xml in the root folder of your web application.
In a few weeks I will write a post, were in I will explain how to create a custom timerjob. So let me know if you are interested in that post.