HomeFix guides → Sitemap <lastmod> within 90 days

geo

How to fix: Sitemap <lastmod> within 90 days

Why this matters

AI crawlers use sitemap <lastmod> values to prioritise which pages to re-fetch. A stale sitemap means new or updated content may be missed entirely — and the LLM continues citing your old version for months.

Background

AI crawlers use sitemap <lastmod> values to prioritise which pages to re-fetch. A stale sitemap means new or updated content may be missed entirely — and the LLM continues citing your old version for months.

References

Sitemap protocol spec · AI crawler prioritisation

How to fix

Code snippet for each stack we cover. Pick the one matching your server / framework.

nginx
No server config — application or CMS responsibility.
apache
Same.
cloudflare
Same.
wordpress
Yoast / RankMath generate sitemap with lastmod automatically. Confirm in plugin settings that lastmod is enabled and updates on save.
flask
Generate sitemap programmatically from your content models; emit <lastmod>{{ updated_at.isoformat() }}</lastmod> per URL.
express
Same — generate from a database query.
rails
Use the sitemap_generator gem; emit lastmod from record.updated_at.

Verify it's working

curl https://your-site/sitemap.xml | grep -i lastmod — at least half of the URLs should have lastmod within the last 90 days.

Want to know if your site has this issue?

Run a free 53-check audit — security, GDPR, NIS2, and technical SEO.

Audit my site →