What is a Sitemap?
Table of Contents
For the purposes of this article, we will focus on Sitemap Protocol 0.9 introduced by SiteMaps.org which is a standard, validated and used by Google and most other search engines.
Although Sitemaps are mainly used to improve the indexing process of your website by search engines, they can be used to provide access to certain pages as well. For example, pages that are not accessible via your menus can be indexed by the search engine if you want.
The Sitemap does not affect the normal way crawler bots index your page – it just extends the visibility and accessibility of your content. Note, that having a Sitemap on your website does not guarantee that certain pages will be indexed and included by the search engines. Neither it affects your page rank.
Sitemap Example
The best way to understand the structure of the Sitemap is to look at an existing one. Therefore, we have prepared a sample map that you can use for the backbone of your personal one. You can copy its code from the lines below, and adjust it to serve your particular needs.
<?xml version="1.0" encoding="UTF-8"?><urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>http://www.yourdomain.com /</loc>
<lastmod>2023-01-01</lastmod>
<changefreq>weekly</changefreq>
<priority>0.8</priority>
</url>
<url>
<loc>http://www.yourdomain.com/catalog?item=vacation_hawaii</loc>
<changefreq>weekly</changefreq>
</url>
<url>
<loc>http://www.yourdomain.com/catalog?item=vacation_new_zealand</loc>
<lastmod>2008-12-23</lastmod>
<changefreq>weekly</changefreq>
</url>
<url>
<loc>http://www.yourdomain.com/catalog?item=vacation_newfoundland</loc>
<lastmod>2008-12-23T18:00:15+00:00</lastmod>
<priority>0.3</priority>
</url>
<url>
<loc>http://www.yourdomain.com/catalog?item=vacation_usa</loc>
<lastmod>2008-11-23</lastmod>
</url>
</urlset>
Sitemap Elements Explanation
- <?xml version=”1.0″ encoding=”UTF-8″?> – This is like an introductory line that tells the search engines what version of the map (XML) they are using and how to read the information (UTF-8).
- <urlset xmlns=”http://www.sitemaps.org/schemas/sitemap/0.9″> – This line sets the starting point of the map, and it’s like saying, “Hey, this is the beginning of our sitemap!”
The “xmlns” part may seem a bit technical, but it’s just defining a set of rules or language that the map uses to organize information. - <loc>http://www.yourdomain.com/</loc> – The <loc> element contains the website address or URL of a specific page. In this example, it points to “http://www.yourdomain.com/”, which is the homepage of the website.
- <lastmod>2023-01-01</lastmod> – The <lastmod> element shows the date when the page was last updated or changed. In this case, the page was last modified on January 1, 2023.
- <changefreq>weekly</changefreq> – The <changefreq> element suggests how often search engines should come back to check for updates on this page. In this example, it recommends that search engines revisit the page weekly to see if there are any changes.
- <priority>0.8</priority> – The <priority> element gives the page a score or importance level compared to other pages on the website. The score ranges from 0.0 to 1.0, where 0.0 means it’s less important, and 1.0 means it’s highly important. In this case, the page has a priority of 0.8, which means it’s relatively important compared to other pages on the website.
- </url> – The </url> closing tag marks the end of the URL information. All the elements mentioned above, like <loc>, <lastmod>, <changefreq>, and <priority>, together form a single entry in the sitemap. It’s like a little package of information about that specific page.