Sitemaps
Sitemaps have been around for a very long time, they were originally used for the users to navigate around the site allot easier; the main format for the early sitemaps where html so you could make them look user friendly.
Sitemaps are used to display all the links in your website, this also makes it easier for the search engines to find all your internal links. The major search engines started implementing sitemaps into there crawling methods and now days it’s a good idea to submit sitemaps to google.
If you are using a sitemap for the benefit of the search engines then you will need to create it using xml, xml is raw code, which is best for google. If you were to submit you sitemap in html google will still crawl it but may miss links ect. Google only crawls a certain amount of data and if you have a html sitemap then you are already wasting precious data.
Using the xml format you are just display the raw data in its best format for google, this type of format doesn’t require allot of data and will make crawling your site even easier for the search engines.
If you have a big website split up into different directories you can use a sitemap for each directory instead of updating you main sitemap each time you add a new page. This site is split up into two sections, 1.the main site and 2. the blog, I have created a sitemap for the main site and a separate one for the blog as the blog gets updated more and is slightly more complicated. Google allows you to submit your site maps through their google webmasters tool section.
Uploading your site map to google is a good idea as google will tell you if there is any problems with your site map. The google webmaster tools section has many great tools to help you find problems with your site and find out abet more detailed information on what google sees.
Google Compliant xml ExampleAll xml sitemaps must start with the following code at the top of the file:
<?xml version=”1.0″ encoding=”UTF-8″?>
<urlset xmlns=”http://www.sitemaps.org/schemas/sitemap/0.9″>
Once you have that added you can start compiling a list of your pages like so:
<url>
<loc>http://example.eu</loc>
</url>
<url>
<loc>http://example.eu/page1.php</loc>
</url>
and so on.
You can also use other commands like:
<url>
<loc>http://example.eu</loc>
<priority>0.8</priority>
</url>
You can set different priorities for different pages, I use 0.8 for my blogs homepage to tell google that the content on that page is important. The scale ranges from 0.1 to 1.0.
You can also set how frequent the content on the page is updated, so for example:
<url>
<loc>http://example.eu</loc>
<changefreq>daily</changefreq>
</url>
You can set the value to “weekly” or “monthly” if you wish. Once you have completed your site map you must use closing tags, like in the example below.
<?xml version=”1.0″ encoding=”UTF-8″?>
<urlset xmlns=”http://www.sitemaps.org/schemas/sitemap/0.9″>
<url>
<loc>http://example.eu</loc>
<priority>0.8</priority>
<changefreq>daily</changefreq>
</url>
</urlset>
I hope you found that useful, feel free to leave a comment if you like.