What is XML Sitemap?

An XML Sitemap is a file that lists the URLs of a website’s pages, along with additional metadata about each page, such as the last modified date and the frequency of updates. It helps search engines understand the structure and content of a website more efficiently, enabling them to crawl and index the site’s pages more effectively.

Example

<?xml version=”1.0″ encoding=”UTF-8″?>
<urlset xmlns=”http://www.sitemaps.org/schemas/sitemap/0.9″>
<url>
<loc>https://www.example.com/page1</loc>
<lastmod>2022-01-20</lastmod>
<changefreq>daily</changefreq>
<priority>0.8</priority>
</url>
<url>
<loc>https://www.example.com/page2</loc>
<lastmod>2022-01-18</lastmod>
<changefreq>weekly</changefreq>
<priority>0.7</priority>
</url>
<url>
<loc>https://www.example.com/page3</loc>
<lastmod>2022-01-15</lastmod>
<changefreq>monthly</changefreq>
<priority>0.6</priority>
</url>
</urlset>

In this example:

  1. Each <url> element represents a specific page on the website.
  2. The <loc> element contains the URL of the page.
  3. The <lastmod> element specifies the date when the page was last modified.
  4. The <changefreq> element indicates how frequently the page will likely change (e.g., daily, weekly, monthly).
  5. The <priority> element assigns a priority value to the page, indicating its importance relative to other pages on the site.
Go back to the Marketing Glossary >>