What is sitemap.xml or XML Sitemap?

Date : 1st April 2026

Summary: It is a way of informing Search engines about pages available on a website, like URL, when last it was updated, how frequently will it be updated, and the priority/importance of the webpage compared to other pages on the site.

In sitemap.xml, as per the sitemaps.org standard, you can specify 4 things about the page.

  1. URL
  2. When was it last updated
  3. How frequently will it be updated
  4. The priority/importance of the webpage on the website compared to other pages on the website

Sample sitemap.xml file:

https://www.example.com/sitemap.xml

Parameters:

  1. loc: URL of the page
  2. lastmod (optional): When the page was last updated
  3. changefreq (optional): How frequently the page will be updated
  4. priority (optional): The priority/importance of the webpage compared to other pages on the website. Specify a value between 0.1 (Lowest) and 1.0 (Highest). The default value is 0.5.

Location:

Generally, it should be located in the root directory of the website, like

TXT

However, it can be placed at any level of your website, for example

TXT

However, in that case, the sitemap.xml file include only URLs that are at the same level as the sitemap.xml file or lower than it, not at a higher level than it.

For example, if the location of the sitemap.xml file is

TXT

It can include only URLs that are the same or at a lower level than it is

https://www.example.com/level-1/sitemap.xml

but not URLs at a higher level than it

https://www.example.com/level-1/sitemap.xml

There any many other complex rules that can be found on the official website: https://www.sitemaps.org/protocol.html#location

sitemap.xml index file:

As per the standard, a sitemap.xml file cannot contain more then 50,000 URLs and the size of the file must not exceed 50MB size. What to do when we have a large number of URLs that exceed this limit?

The answer is a sitemap.xml index file. A sitemap.xml file that points to other sitemap files.

XML

The pointed file can also be another index file.

Reference:

There are many deep and technical things are there about sitemap.xml file, which can be found on its official website https://www.sitemaps.org/protocol.html

Note:

This is how you provide information about the pages of your website to the search engines. How to use this information is up to the search engine. Google ignores "changefreq" and "priority" - https://developers.google.com/search/docs/crawling-indexing/sitemaps/build-sitemap#additional-notes-about-xml-sitemaps

If you have any questions or suggestions, feel free to contact me.