By SitemapFixer Team
Updated April 2026

XML Sitemap Format: Complete Reference with Examples

Validate your sitemap format freeAnalyze My Sitemap Free

Standard Sitemap 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>2025-04-01</lastmod>
<changefreq>daily</changefreq>
<priority>1.0</priority>
</url>
<url>
<loc>https://example.com/about</loc>
<lastmod>2025-01-15</lastmod>
<changefreq>monthly</changefreq>
<priority>0.8</priority>
</url>
</urlset>

Field Reference

<loc>REQUIRED

The URL of the page. Must be fully qualified with protocol (https://). No relative URLs. Use the canonical version consistently - same protocol and www/non-www convention as your canonical domain. Maximum 2,048 characters.

<lastmod>OPTIONAL

The date the page was last significantly modified, in ISO 8601 format: YYYY-MM-DD. Google uses this to prioritize recrawling recently changed pages. Only include lastmod if it accurately reflects when content changed. Google ignores lastmod if it is always today for all URLs.

<changefreq>OPTIONAL

How frequently the page is likely to change. Values: always, hourly, daily, weekly, monthly, yearly, never. This is a hint to crawlers, not a directive. Inaccurate values train Google to distrust your sitemap. If you are unsure, omit this field entirely.

<priority>OPTIONAL

The priority of this URL relative to other URLs on your site. Value between 0.0 and 1.0, default 0.5. This is relative within your own site only. Google states it largely ignores priority. Only use it if you have a genuine reason to differentiate crawl priority.

Sitemap Index Example

<?xml version="1.0" encoding="UTF-8"?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<sitemap>
<loc>https://example.com/sitemap-blog.xml</loc>
<lastmod>2025-04-01</lastmod>
</sitemap>
<sitemap>
<loc>https://example.com/sitemap-products.xml</loc>
<lastmod>2025-04-01</lastmod>
</sitemap>
</sitemapindex>
Validate your sitemap format
Free - checks XML format, URLs, and field values
Analyze My Sitemap Free

Related Guides