Sitemap XML

The sitemap file type is XML.

Listen

A podcast overview related to Sitemap XML made with Google NotebookLM.

Impact

(How ScanGov measures tasklist priorities.)

Why it's important

XML is the most widely supported and recommended format for sitemaps, as it allows search engines to easily parse and understand the content structure, helping with better indexing and crawling of the site.

User stories

As a search engine bot, I want the website to provide a properly formatted XML sitemap so that I can efficiently crawl and index all relevant pages, improving the site's visibility in search results.

Error

(ScanGov messaging when a site fails a standard)

Sitemap is not in XML format.

About

The sitemap is an Extensible Markup Language (XML) file on the website’s root directory that include metadata for each URL, such as:

  • when it was last updated
  • how often it usually changes
  • how important it is, relative to other URLs in the site

Examples

Example government website sitemaps:

Code

Example sitemap code:

<?xml version="1.0" encoding="UTF-8"?>

<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">

   <url>

      <loc>http://www.example.com/</loc>

      <lastmod>2005-01-01</lastmod>

      <changefreq>monthly</changefreq>

      <priority>0.8</priority>

   </url>

</urlset>

Guidance

Indicator

Feedback