xml-sitemap/SKILL.md
Facts to use
- One sitemap file holds at most 50,000 URLs and 50 MB uncompressed. Use a sitemap index for more.
- Use absolute, canonical URLs that return 200. Leave out redirects, noindex pages and error pages.
- Google uses
<lastmod>only when it is consistently and verifiably accurate. It must show the last significant change to the page. Google ignores<priority>and<changefreq>. - Add
Sitemap: https://example.com/sitemap.xmlto robots.txt and submit the sitemap in Search Console and Bing Webmaster Tools.
Workflow
- Build the URL list from the router or CMS, not from a crawl only, so new pages are included.
- Remove URLs that are not canonical, return non-200, or are noindex.
- Set
lastmodto the date the main content last changed, in W3C date format. - Generate the file at build time or on request, served as
application/xmlwith status 200. - Add the robots.txt line and submit in both search consoles.
- Re-check the Sitemaps report for errors and for "Discovered, currently not indexed" pages.
Template
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>https://example.com/pricing</loc>
<lastmod>2026-02-01</lastmod>
</url>
</urlset>Checks
- Every URL returns 200 and is its own canonical.
- The sitemap URL is in robots.txt.
Output
The sitemap or generator code and the list of URLs removed, with the reason.
Sources
- Google: Build and submit a sitemap. https://developers.google.com/search/docs/crawling-indexing/sitemaps/build-sitemap