What is Sitemap XML?

A list of pages on a website that search engines should index. Written in extensible markup language (XML), both humans and computers can understand a sitemap XML. In addition to page URLs, they include modification dates so search engines can tell whether or not a page has been crawled since it was updated. Sitemap XML- and robots.txt-related search engine optimization (SEO) tactics approach indexing from different sides of the same coin.

Example

<?xml version=”1.0″ encoding=”UTF-8″?>
<urlset xmlns=”http://www.sitemaps.org/schemas/sitemap/0.9″>
<url>
<loc>https://www.example.com/</loc>
<lastmod>2024-01-22</lastmod>
<changefreq>daily</changefreq>
<priority>1.0</priority>
</url>
<url>
<loc>https://www.example.com/about</loc>
<lastmod>2024-01-20</lastmod>
<changefreq>weekly</changefreq>
<priority>0.8</priority>
</url>
<url>
<loc>https://www.example.com/products</loc>
<lastmod>2024-01-18</lastmod>
<changefreq>monthly</changefreq>
<priority>0.7</priority>
</url>
</urlset>
In this example:

  • <urlset> is the root element of the XML file.
  • <url> represents each URL entry within the sitemap.
  • <loc> specifies the URL of the webpage.
  • <lastmod> indicates the date when the webpage was last modified.
  • <changefreq> specifies the expected frequency of changes to the webpage content.
  • <priority> indicates the priority of the webpage relative to other pages on the site.
Go back to the Marketing Glossary >>