Sitemap lastmod: How Google and Bing Use It
Short answer: <lastmod> tells search engines when a page last changed. It is optional, but Google and Bing both use it to decide which pages to crawl again. The catch: it only helps if it’s true. Google uses it only when it is “consistently and verifiably” accurate. Set it to the date the page content changed, in W3C Datetime format, and never to the date you rebuilt the sitemap.
What lastmod looks like
<url> <loc>https://example.com/pricing</loc> <lastmod>2026-10-13T09:30:00+00:00</lastmod> </url>
The format is W3C Datetime, a profile of ISO 8601. Both of these are valid:
2026-10-13: date only.2026-10-13T09:30:00+00:00: date, time and time zone. Bing’s 2025 sitemap post asks for this fuller form.
10/13/2026, October 13, 2026 and Unix timestamps are not valid.
How Google uses it
Google’s sitemap docs say it uses <lastmod> if the value is “consistently and verifiably” accurate, for example when it matches the last real change to the page. A change counts when it touches the main content, the structured data or the links. A new copyright year doesn’t count. Google ignores the other two optional tags, <changefreq> and <priority>, entirely.
“Consistently” is the key word: the dates have to be right across your sitemap, not just now and then. Bing says the same thing more bluntly below.
How Bing uses it
Bing is more open about it. Its July 2025 post on sitemaps in AI-powered search calls lastmod a key freshness signal: Bing uses it to decide which URLs to recrawl, and can skip URLs whose content hasn’t changed. That matters for Bing search and for Copilot answers built on Bing’s index. The same post says Bing ignores changefreq and priority, and re-fetches sitemaps at least once a day.
Bing’s February 2023 post shared what it found in real sitemaps: the date on most XML sitemaps was the date the sitemap was generated, not the date the content changed. Identical dates on every URL were the most common error, and Bing said it may ignore dates that are always set to today.
The mistakes that make lastmod useless
Every URL gets today’s date
The sitemap generator stamps the build time on every URL. It looks fresh, but it’s false, and it’s exactly the pattern both engines learn to ignore.
The date changes for tiny edits
A footer change, a new ad slot or a CSS tweak changes every page’s “modified” field. Update lastmod only when the main content, structured data or links change.
Wrong format or future dates
Locale date formats are invalid, and a date in the future can’t be true. Both are easy to catch with a quick look at the file.
Missing on some URLs
A missing lastmod is not an error. The protocol makes it optional. Search engines then simply have less to go on for that URL. Fill it in where you have a real date, and leave it out where you don’t.
How to set lastmod correctly
- Use the content’s own “updated” date. In WordPress that is the post’s modified date. In a headless CMS or a database, use the field that changes when an editor saves the page, not a field that changes on every deploy.
- For static or generated sites, use the last commit date of the page’s source file, or a date you set by hand when you edit. If all pages share one build time, leave lastmod out.
- Test it. Edit one page, rebuild the sitemap, and check that only that URL’s lastmod changed.
- Tell Bing right away with IndexNow when an important page changes, and let the sitemap carry the date.
Our free XML sitemap generator follows the same rule. It writes lastmod only from a real Last-Modified header, and drops dates that are less than an hour old or shared by most pages (signs of a build or server timestamp).
lastmod in a sitemap index
In a sitemap index, <lastmod> on a <sitemap> entry means something different: the time that child sitemap file changed. Update it when any URL inside that file is added, removed or gets a new lastmod.
Frequently asked questions
Is lastmod required in a sitemap?
No. Only <loc> is required. But Google and Bing both use an accurate lastmod to decide what to recrawl, so it is worth adding if you can make it truthful.
What format should lastmod use?
W3C Datetime. 2026-10-13 is valid. 2026-10-13T09:30:00+00:00 adds the time and time zone, which Bing asks for. Formats like 10/13/2026 are not valid.
Should lastmod change every time the sitemap is rebuilt?
No. It should be the time the page content changed. Bing found that most sitemaps it studied used the sitemap generation date instead, and it may ignore dates that are always today.
Is it better to leave lastmod out than to guess?
Yes. A missing lastmod is just missing information. A wrong one is worse: Google uses lastmod only when it is consistently accurate, and Bing says it may ignore dates that are always set to today.
What counts as a change worth updating lastmod for?
Google lists changes to the main content, the structured data or the links on the page. A new copyright year in the footer does not count.