Robots & Sitemap Checker

Guides › Sitemaps

XML sitemap format: a minimal valid example

<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
  <url>
    <loc>https://example.com/</loc>
    <lastmod>2026-10-01</lastmod>
  </url>
  <url>
    <loc>https://example.com/products?id=1&amp;color=red</loc>
  </url>
</urlset>
TagRequiredNotes
<urlset> + xmlnsYesNamespace must be exactly http://www.sitemaps.org/schemas/sitemap/0.9
<url><loc>YesAbsolute, fully qualified URL, max 2,048 characters, XML-escaped
<lastmod>NoW3C Datetime. Google uses it if it's consistently accurate
<changefreq>, <priority>NoIgnored by Google

Escaping

Inside <loc>, write & as &amp;, < as &lt; and > as &gt;, and quotes as &quot; and &apos;. A single raw ampersand makes the whole file invalid XML. The file must be UTF-8.

Check your site now

Related

Sitemap index files: when and how to split sitemapsSitemap limits: 50,000 URLs and 50 MBlastmod, priority and changefreq: what Google actually usesImage sitemaps: syntax and when you need oneWhere to put your sitemap and how to submit it

More free tools from Swift Labs

OG Preview Tool
Preview links on Facebook, LinkedIn, X and Slack, and audit Open Graph tags.
Email DNS Check
Check SPF, DKIM, DMARC and MX records in seconds.
DeadLinkPatrol
Find broken links across your whole site.