In the majority of cases it is easier, quicker and more efficient to use an online tool to create a sitemap for you to submit to the search engines. But some people like to understand what goes on behind the scenes of such tools, or would like to do it themselves. Perfectly understandable feelings and a method that will suit certain people and sites.
To that end we have created below a definition of the important XML sitemap tags for you below. Good luck in your endeavors!
Remember that it is important that you do all the creation in a plain .txt file, as the formatting form more 'advanced' word processing extensions will interfere with the coding.
The first thing that you need to do is define the type of file it is (XML). To do that you need to write in
<?xml version='1.0' encoding='UTF-8'?>
After you have done that it is important to let the search engine spiders understand that this file is a sitemap.
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
This tells them that it is a sitemap that follows the sitemap.org 0.9 specifications (which is what both Google and Yahoo use).
Once you have done that you need to enter the information for every page on the site that you want the search engine to index, which means pages that will appear in the search results of the search engines when a keyword has been used.
To do that you need to set up a template like this for every page
<url>
<loc>http://www.yoursite.com/</loc>
<lastmod>2009-04-27</lastmod>
<changefreq>weekly</changefreq>
<priority>0.5</priority>
</url>
The <url> tag is, same as with html, showing the search engine spider the url that it should follow, it shows to it that following that tag, and before the </url> tag there is a link to a page for it to index.
The <loc> tag gives the specific location (website page) for the spider to go to and index.
The <lastmod> tag is a tag that informs the spider when the page was last modified so that it knows whether alterations have been made to the page since its last visit – it relies on this to see whether it needs to reindex any changes. It is essential that you use the date format 'yyyy-mm-dd' when creating this tag.
The <changefreq> tag tells the spider how often you change the text and how often it should therefore check back. This doesn't guarantee that the spider will come back at that interval, but does help encourage it.
The <priority> tag is a tag that lets the spider know how important the page is to you. It is a relative value between 0.0 and 1.0 with 0.5 being the default value. Because this value is relative assigning all pages high numbers won't help you at all.
And remember when you have finished coding ALL your pages make sure that you close it off with the </urlset> tag which tells the spider that it is the end of the sitemap.
© xSitemap.com 2009 - All Rights Reserved