What is a XML Sitemap?

daily ocr article main image
Date: 2023-12-20 | Category: XML Sitemap
Author: Herbert Stonerock

What are sitemaps?

Sitemaps are files or documents that list all the pages of a website, typically organized in a hierarchical structure and it serves as a roadmap for search engines and visitors to navigate a website effectively.

Sitemaps are usually split into four types:

  1. XML Sitemaps
  2. HTML Sitemaps
  3. Image Sitemaps
  4. Video Sitemaps

In this article we will focus on the XML type because it is the most important and helpful to search engines, the HTML, Image and Video types will be tackled in another article with an in depth explanation.

What is an XML Sitemap

It is a map specifically designed for search engines to crawl and index web pages efficiently. It provides metadata about each page on the site such as the last modified date, frequency of updates, and the priority of the page relative to other pages on the site, it provides all of this information to help search engines understand the site's structure and content better.

XML or Extensible Markup Language syntax is used to format the sitemaps, add meta data and to create an URL structure. This is a language similar to HTML but designed to be more flexible and extensible having many other uses besides the sitemaps.

The structure of the sitemap.

The structure of an XML sitemap is relatively straightforward and follows a hierarchical format which is very easy to understand.


The XML declaration specifies the XML version being used and the character encoding used in the document.

Root Element - urlset

The element is the root element of the XML sitemap. It encapsulates all the URL entries within the sitemap. The xmlns attribute declares the XML namespace for sitemaps.

URL Entries - url

Within the element, each individual URL on the website is represented by a element.Multiple elements can exist within the element, each representing a unique webpage on the website.

URL Metadata

Within each element, various metadata about the URL is specified using specific child elements. These metadata elements typically include

  1. <loc>: Specifies the URL of the webpage.
  2. <lastmod>: Indicates the last modification date of the URL's content.
  3. <changefreq>: Specifies how frequently the URL's content is likely to change.
  4. <priority>: Denotes the priority of the URL relative to other URLs on the website.
  5. Additional metadata elements such as <image> or <video> if the URL represents multimedia content.

This structured format of an XML sitemap provides a clear representation of the website's URLs and their associated metadata, facilitating efficient crawling, indexing, and ranking by search engines.

What benefits you get by having one?

  • Improved Crawling - Search engines like Google, Bing, and others can crawl your website more efficiently, ensuring that all your content gets indexed.
  • Enhanced Visibility - By making your site's structure clear, you increase the chances of search engines ranking your content higher in search results.
  • Notifications - After updating your sitemap by adding some new URLs, you can resubmit your sitemap to most of the search engines, by doing this the search engines will get notified and will rescan your sitemap usually faster than your next scheduled scan.

Are there limitations?

In short, Yes. There are file size and URL list length limitations but they are easily overcomed. According to https://www.sitemaps.org/ you are not allowed to have:

  1. URL lists larger than 50000 URLs
  2. File size larger than 50MB (52,428,800 bytes)

In order to meet the two conditions above you can create a sitemap index file witch is very similar to a sitemap, the difference being that this file points to other sitemap files. So, you can create multiple sitemap files that all meet requirements above and with a sitemap index file that points to them you can direct crawlers to all your sitemaps.


If you are a website owner it is necessary to have a sitemap if your goal is get visible on the internet so that you gain more users. You also need to make sure that your xml sitemap is valid by creating the sitemap using the https://www.sitemaps.org/ protocol. There some online tools that will validated your sitemap, by checking if your sitemap is following the protocols, this is necessary for the web crawlers to read and understand the sitemap.

Image by jcomp on Freepik
Article Contents
Subscribe to our blog

Subscribe to the blog newsletter to get updates about articles, tools and services.

Share this article

Leave a comment

Comments (0)

No comments yet. Be the first to tell us what you think!