List every real page in your sitemap, and set each page's lastmod from when its content last changed, not from when the site was built. Search engines use lastmod only when it's consistently accurate.
A sitemap is a list of the pages you want found. Each entry can carry a lastmod date saying when that page last changed:
<url>
<loc>https://example.com/pricing</loc>
<lastmod>2026-09-14</lastmod>
</url>
Used well, that date helps search engines spend their visits on pages that actually changed.
The common mistake
Many sites generate the sitemap during the build and stamp every page with the build time. Every deploy, every page "changes", including pages nobody has touched in a year. Google has said it uses lastmod only when it's consistently and verifiably accurate. If the dates are always today, they stop meaning anything.
Other problems to look for
- Missing pages. New sections or products that never made it into the sitemap.
- Pages that shouldn't be there. Redirects, 404s, staging URLs or pages marked
noindex. - An empty or unreachable sitemap, or one that isn't listed in
robots.txt.
How to get it right
- Generate the sitemap from your real list of routes or published content.
- Set
lastmodfrom the content's own date: the CMS "updated at" field, or the last commit that touched that page's content. - Leave
lastmodout rather than inventing it if you don't have a real date. - Point to the sitemap from
robots.txt:
Sitemap: https://example.com/sitemap.xml
Try it with your agent
# Task
Generate the sitemap from the real route list. Set each
<lastmod> from the content source (CMS updated_at or the git
commit date), not the build time.
# Done when
The sitemap lists every real page, and lastmod only changes
when that page's content changes.
PocketBees reads your sitemap on every scan and flags missing pages and dates that are all identical.