XML Sitemap Format: Complete Reference with Examples
Standard Sitemap Example
Field Reference
<loc>REQUIREDThe 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>OPTIONALThe 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>OPTIONALHow 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>OPTIONALThe 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.