What is a Sitemap?

In simple words, XML Sitemap is a list of website URLs in XML format. The Sitemap is designed to inform search engines (such as Google, Bing, Yahoo, Yandex, MSN, and others) about the pages on the website, which should be indexed and included in search results. Sitemap speeds up site crawling significantly. In addition, XML Sitemap allows you to transmit information about all website pages, including those that search engines bots can't discover with the usual crawl.

Creating a Sitemap is especially useful when:

What does a Sitemap do

What's inside a Sitemap?

According to the XML Sitemaps Protocol and the basic requirements of search engines, the Sitemap file should contain no more than 50,000 URLs and not exceed the size of 10MB. Thus, if your Sitemap needs to contain more than 50,000 pages or the file size exceeds 10MB, you must split it into multiple files.

The basic syntax for the Sitemap element is:
    <url>
        <loc>URL</loc>
        ...
    </url>

In addition to the required URL parameter, the XML Sitemaps protocol provides some additional tags for each page.

The Lastmod tag indicates the date the page was last modified or updated.

Lastmod tag syntax:
    <lastmode>Date (ISO 8601)</lastmode>

The Changefreq tag indicates the probable frequency of page content updates. Valid tag values are:

Changefreq tag syntax:
    <changefreq>Valid value</changefreq>

The Priority tag is the priority of a page relative to other pages on the website. Valid values are in the range from 0,0 to 1,0. This tag lets search engines know which pages you think are the most valuable.

Priority tag syntax:
    <priority>Decimal from 0.0 to 1.0</priority>

A simple example of an XML Sitemap with just one page:

    <?xml version="1.0" encoding="UTF-8"?>
    <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
            <url>
                <loc>https://website.tld/</loc>
            </url>
    </urlset>

Sitemap extentions

In addition to the basic protocol, there are file extensions based on additional XML namespaces. This allows the creation of Sitemaps that contain information about the site's images or available alternative language versions.

A simple example of an Image Sitemap containing 1 page and 1 image:

    <?xml version="1.0" encoding="UTF-8"?>
    <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:image="http://www.google.com/schemas/sitemap-image/1.1">
            <url>
                <loc>https://website.tld/</loc>
                <image:image>
                    <image:loc>https://website.tld/logo.png</image:loc>
                </image:image>
            </url>
    </urlset>

Benefits and importance of a Sitemap

All major search engines support direct interaction through XML Sitemaps, which can significantly speed up site crawling and improve crawl coverage and, as a result, achieve better search visibility. So, Sitemaps are essential for ensuring that search engines discover all of your site's content and better understand how it's organized.