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&color=red</loc>
</url>
</urlset>
| Tag | Required | Notes |
|---|---|---|
| <urlset> + xmlns | Yes | Namespace must be exactly http://www.sitemaps.org/schemas/sitemap/0.9 |
| <url><loc> | Yes | Absolute, fully qualified URL, max 2,048 characters, XML-escaped |
| <lastmod> | No | W3C Datetime. Google uses it if it's consistently accurate |
| <changefreq>, <priority> | No | Ignored by Google |
Escaping
Inside <loc>, write & as &, < as < and > as >, and quotes as " and '. A single raw ampersand makes the whole file invalid XML. The file must be UTF-8.
Check your site now