Sitemaps and how to create them

Created: | Updated:

A sitemap is a great thing to promote the proper links to search engines. So let’s see how such a sitemap is looking like.

Simple sitemap file

A basic sitemap file has the following structure. You can use such sitemaps for up to 50.000 entries:

<?xml version="1.0" encoding="UTF-8"?> 
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"> 
<url> 
<loc>http://www.alooha.com/sitemap_travel.xml</loc> 
<lastmod>2014-11-07</lastmod> 
</url> 
</urlset> 

Linking to sitemaps for large sites

This is a general sitemap linking to some others because there should be a limit of 50.000 links per sitemap:


<?xml version="1.0" encoding="UTF-8"?> 
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"> 
<sitemap> 
<loc>http://www.alooha.com/sitemap_travel.xml</loc> 
<lastmod>2014-11-07</lastmod> 
</sitemap> 
</sitemapindex> 

And here the sitemap file:

<?xml version="1.0" encoding="UTF-8"?> 
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"> 
<url> 
<loc>http://www.alooha.net/language.html?start=0</loc> 
<lastmod>2014-11-08</lastmod> 
<changefreq>weekly</changefreq> 
<priority>0.8</priority> 
</url> 
</urlset> 

Details can be found at Build a sitemap. You can (should) also add the sitemap to your robots.txt file. Be aware that it should be a full URL (unlike the one I used over here):
Sitemap: /sitemap.xml
User-agent: *
Allow: /