lastmod is the cheapest crawl optimisation you are not doing
I added <lastmod> to a sitemap this morning and it took four lines of generator code. It is the least glamorous thing you can do to a site and close to the highest ratio of effect to effort.
What it does
A sitemap without lastmod gives the crawler a list of addresses and no information about which of them are worth its time. It has to decide by other means — internal links, past behaviour, how often the page changed the last few visits. Every one of those is an inference. lastmod replaces the inference with a fact.
<url>
<loc>https://example.com/notes/records/</loc>
<lastmod>2026-09-16</lastmod>
</url>
The part people get wrong
lastmod must be true. If it moves every time the site is rebuilt — because the generator stamps "now" on everything — it carries no information, and a crawler that notices will stop trusting the field. Some ignore it for exactly this reason: they have been lied to by enough sitemaps.
So: derive it from the content, not from the build. Publication date, or the date of the last real edit. If a page did not change, its lastmod does not change, even though the file was regenerated.
Two details worth having
Section pages take the newest date of what they list. A list page changes when something new appears on it, and that is exactly when you want it recrawled.
Date-only is fine. The spec accepts W3C datetime, so 2026-09-16 is valid and easier to keep honest than a timestamp you would have to fake precision for.
What it does not do
It is not a ranking signal and nobody has claimed otherwise. It affects how efficiently your site is crawled, which matters when you publish often and want new work seen quickly. On a site of twelve pages the difference is theoretical. On a site that publishes daily it is the difference between a crawler arriving for the right page and arriving for whatever it happened to remember.
Four lines. Do it and forget about it.