If a sitemap opens without an error, it is tempting to tick the box and move on. I still want to know whether it is describing the right pages.
In July 2026 I fixed a small naming mismatch in my WordPress sitemap code. A hook supplied one object-type name and a condition checked a slightly different one. The XML still existed, but the intended modification-date logic never ran. Related work extended that handling to viewable custom content types.
Check what a date actually means
The useful question is whether a page changed, not whether a sitemap happened to be regenerated. Setting every entry to today can make a file look fresh while saying very little about its contents.
Google’s sitemap guidance describes lastmod as the date of a significant page update. I use the underlying content change as the starting point, and check that the timestamp survives the route from stored content to the XML response.
Test the list as well as the file
- Choose a published page that should be listed and find it in the correct child sitemap.
- Check that drafts, deliberately excluded pages and unsuitable content types stay out.
- Open a listed URL and inspect its response and preferred address.
- Update a representative page and verify the relevant date changes.
- Check an unchanged page has not acquired a made-up update date.
- Check page counts and pagination when exclusions are applied.
That final point matters on larger archives. If the total includes records that will never be emitted, a sitemap index can advertise pages that do not contain the expected entries. Counting and filtering need to agree.
Generation is part of the system too
A sitemap is only useful if it can be served reliably. Later maintenance work moved towards rebuilding copies in the background while continuing to serve the last good version. That separates the visitor or crawler’s request from the expensive job of assembling a large file.
The same trade-off turns up elsewhere in website maintenance. I have written about the hosting side in why cache clears need a work queue.
I do not use a sitemap as a substitute for a browsable site, and submitting one does not guarantee indexing. It is a useful, explicit record of the pages I want to make discoverable. That record earns its place by being accurate.