Sitemap XML

The sitemap file uses the required XML format.

On this page

Impact

ScanGov impact ratings

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

Risks

Search engines cannot read your sitemap.

Why it's important

Stores site structure in a readable format, helping search engines efficiently crawl and index all website pages.

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.

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>

Error

ScanGov messaging when a site fails a standard:

Sitemap is not in XML format.

Examples

Example government website sitemaps:

Guidance

Indicators

On this page