Lastmod Tag in Sitemap: How Google & Bing Use It

The lastmod tag in a sitemap tells search engines when a page last had a significant change. Google and Bing both use it to decide which URLs to recrawl and how soon, but only when the dates are accurate. A sitemap that stamps every URL with the generation time, or with today’s date, gets its lastmod values ignored. This guide explains what the tag is, how Google and Bing treat it, the format to use, the mistakes that make engines distrust it, and how to get it right in WordPress and in generated sitemaps.

What the lastmod tag is

The sitemaps protocol defines four child elements for each URL entry: loc, lastmod, changefreq and priority. Only loc is required. lastmod is an optional element holding the date the linked page was last modified, in W3C Datetime format. The protocol is explicit that this is the modification date of the page itself, not the date the sitemap file was built, and that it is separate from the If-Modified-Since HTTP header, which engines may treat differently.

A minimal entry looks like this:

<url>
  <loc>https://example.com/technical-seo/</loc>
  <lastmod>2026-10-22T20:02:30+00:00</lastmod>
</url>

The same element is allowed inside a sitemap index file, where it describes when a child sitemap last changed. Most sitemap generators set it to the newest lastmod among that child’s URLs. The same rules apply at both levels. The sitemap section of our technical SEO guide covers where sitemaps sit in the wider crawling and indexing picture.

How Google uses lastmod

Google’s sitemap documentation states that it uses the lastmod value if it is consistently and verifiably accurate, which Google checks by comparing it to the last modification of the page. The value should reflect the last significant update. Google counts changes to the main content, structured data or on-page links as significant. A changed copyright year in the footer is not.

The role of the tag grew in June 2023. When Google announced that the sitemaps ping endpoint would be retired, it said in the same post that lastmod is now used as a signal for scheduling crawls to URLs it has already discovered. The ping endpoint stopped working at the end of 2023, so the sitemap file itself, read via robots.txt or Search Console, is now the way to tell Google that known pages changed.

Trust is binary

In June 2024 Google’s Gary Illyes was asked whether Google keeps a reputation score for a site’s lastmod dates. His answer: “It’s binary: we either trust it or we don’t.” There is no partial credit. If enough dates fail the comparison with the actual page, Google drops the signal for the sitemap, and inaccurate dates on a few templates can cost the whole site. Illyes has since repeated that a site whose dates are wrong is better off leaving the tag out entirely.

changefreq and priority

Google’s documentation says plainly that it ignores priority and changefreq. Bing says most values it sees for these two tags are set incorrectly and repeat across the sitemap, so it largely ignores them too. Of the three optional tags, lastmod is the only one that still influences crawling at either engine. Keeping changefreq and priority in a sitemap does no harm, but spending time tuning them is wasted.

How Bing uses lastmod

Bing was the first engine to make the case publicly. In February 2023 Fabrice Canel, Principal Product Manager at Microsoft Bing, published a study of sites with at least one URL in Bing’s index and announced that Bing was rebuilding its crawl scheduling around lastmod, with full rollout by June 2023. The aim is to crawl unchanged pages less and reach recently updated pages faster.

The study numbers show how common the problem is:

  • 58% of hosts had at least one XML sitemap known to Bing; 42% had none.
  • Of those sitemaps, 84% set lastmod and 16% left it out.
  • Among sitemaps with lastmod, 79% had correct values, 18% had incorrect values and 3% set it for only some URLs.

Bing named identical dates across all URLs as the most common error, usually because the generator writes the time it ran. Bing accepts that a page published today legitimately carries today’s date, but if the dates consistently match the current date every time the sitemap is fetched, Bing disregards them. The post also asks site owners to update lastmod whenever a page changes and to regenerate sitemaps at least daily.

The correct lastmod format

Use W3C Datetime. Two forms are accepted everywhere:

  • Date only: 2026-10-22
  • Date and time with timezone offset: 2026-10-22T20:02:30+00:00 (or Z for UTC)

Prefer the full timestamp when your platform can supply it. It lets an engine distinguish a page edited this morning from one edited last night, which matters for news and price pages. Always include the offset. A bare 2026-10-22T20:02:30 is ambiguous, and a server in one timezone writing dates that WordPress stores in another is a frequent source of dates that sit a few hours in the future. Future dates are a quick way to fail Google’s verification.

Mistakes that make engines ignore lastmod

Five patterns account for nearly all of the incorrect dates Bing measured. Each has a straightforward fix.

Generation time instead of modification time

The classic error. Static site generators, custom scripts and some e-commerce platforms write now() into every entry. Every fetch shows fresh dates on pages that have not changed in years. Fix it by reading the content’s own modified timestamp from the database or version control, and by writing nothing at all when no reliable timestamp exists.

Cosmetic changes bumping the date

Sidebars, “related posts” widgets, comment counts, view counters and footer years change the rendered HTML without changing the page. If your sitemap’s lastmod moves whenever the template re-renders, engines see a date that does not match a content change. Tie lastmod to the content record, not to the render.

Bulk edits and migrations

A search-and-replace across the database, a plugin that resaves every post, a theme switch or a migration to a new host can set thousands of modified dates to the same minute. That is exactly the identical-dates pattern Bing warns about. After a bulk operation, check the sitemap. If every page shares one timestamp, either restore the original modified dates from a backup or accept that the signal is lost until pages are edited individually.

Cached sitemaps and CDNs

A sitemap cached for a week at a CDN or page-cache plugin shows stale dates while the pages behind it have moved on. Set a short cache time for sitemap URLs, or purge them on publish. The opposite failure also happens: a cache that serves a dynamically dated sitemap stamps it with the time the cache filled.

Faking freshness

Setting dates forward to look updated does not work. Google compares the date with the page, and once the comparison fails the signal is dropped for the sitemap. The honest route to faster recrawls is to make real updates and let the dates follow.

lastmod in WordPress

WordPress 6.5, released in April 2024, added lastmod to the core sitemaps at wp-sitemap.xml, populated from each post’s modified date. Google’s Illyes publicly encouraged site owners to upgrade for that reason. The major SEO plugins did this earlier and remain the usual choice because they also handle noindex pages, images and custom post types:

  • Rank Math writes each post’s modified date into post-sitemap.xml and page-sitemap.xml, and the newest of those into sitemap_index.xml. This site runs Rank Math; each URL in our post sitemap carries its own date, and the index entry for pages moved when a page was last edited, while the post entry kept the older date of the last post edit. That is what a correct sitemap looks like.
  • Yoast SEO has always included lastmod from the modified date, updates it when content changes and does not touch it on sitemap regeneration.
  • All in One SEO follows the same model.

The WordPress-specific trap is the modified date itself. Any plugin that updates post meta via the standard save path can bump post_modified. Automatic plugin or theme updates do not, but a “resave all posts” tool, a bulk category change or an import re-run will. Before running one, decide whether you want every date reset, and check the sitemap afterwards.

How to check your own sitemap

A five-minute audit catches the problems above:

  1. Open the sitemap index and each child sitemap. Count how many distinct lastmod values appear. One value for hundreds of URLs means generation time.
  2. Fetch the sitemap twice, an hour apart. If the dates moved and the pages did not, the dates are not modification dates.
  3. Pick ten URLs and compare the lastmod with the visible “updated” date on the page, the HTTP Last-Modified header where present, and the dateModified in the article’s structured data. All three should agree.
  4. Check for dates in the future and for timestamps without a timezone offset.
  5. In Search Console, open the Sitemaps report and confirm the sitemap is read without errors and that the “last read” date advances. For individual pages that need a faster recrawl than lastmod alone delivers, use the URL Inspection tool as described in our guide to indexing a URL in Google Search Console.

For large sites, run the comparison in step 3 programmatically across the whole sitemap. A mismatch rate above a few percent is the point at which Google’s binary trust decision is likely to go against you.

What lastmod does not do

An accurate lastmod gets a changed page recrawled sooner. It does not get a page indexed that would otherwise be left out, it does not improve rankings, and it does not replace internal links or a sitemap submitted in Search Console and Bing Webmaster Tools. For pages Google has never seen, discovery still comes from links and from the sitemap listing the URL at all. For urgent updates to many URLs, Bing and the other IndexNow engines accept direct pushes; Google does not, so for Google the combination of a correct sitemap and good internal linking is the whole toolkit.

Disclaimer

This article describes the public documentation and statements of Google, Microsoft Bing and sitemaps.org as of October 2026. Search engines change crawling behaviour without notice. Check the current official documentation before changing a production sitemap.

Reference sources

[Reference sources: to be added by the editor]

FAQ

Is lastmod required in a sitemap?

No. Only the loc element is required by the sitemaps protocol. lastmod is optional, but it is the one optional tag Google and Bing still act on, so include it whenever you can supply an accurate date.

Should I use the date only or the full timestamp?

Both are valid W3C Datetime values. Use the full timestamp with a timezone offset when your platform tracks modification times, because it is more precise. Use date only if that is all you can produce accurately.

Does Google still use lastmod?

Yes. Since June 2023 Google has said it uses lastmod to schedule recrawls of URLs it already knows, provided the values are consistently accurate. If they are not, Google ignores them for that sitemap.

Does changing lastmod help my rankings?

No. It affects when a page is recrawled, not how it ranks. Changing the date without changing the page gets the signal ignored.

What counts as a significant change?

Google names updates to the main content, structured data or on-page links. Footer years, comment counts, widgets and other template changes do not count.

Does WordPress add lastmod automatically?

Yes, since WordPress 6.5 the core sitemap includes it from the post’s modified date. Rank Math, Yoast SEO and All in One SEO have done the same for years in their own sitemaps.