ContextBolt SEO Free for 7 days. Keywords, SERPs, backlinks and AI visibility, inside Claude. SEO data inside Claude. Start free trial
Guide · Sitemap lastmod

Sitemap lastmod: What Google Uses, and the Right Format

Sitemap lastmod is the optional <lastmod> tag that tells search engines when a page last changed in a way that matters. Google uses it when it is “consistently and verifiably” accurate, and ignores the <priority> and <changefreq> tags next to it.

On November 16, 2026 we read the sitemaps of 22 well-known sites. 17 set lastmod, none used an invalid format, and 2 gave every URL the same date, the pattern Bing names as the most common lastmod mistake.

We build ContextBolt SEO, which reads your Search Console from your AI agent, so weigh the bias. Everything below works with a text editor and Google’s free tools.

  • Does Google use it: yes, when it is consistently and verifiably accurate. Google ignores priority and changefreq.
  • The format: W3C Datetime. 2026-11-16 works, and so does 2026-11-16T09:00:00+00:00. A time with no time zone is an Invalid date in Search Console.
  • What counts as a change: main content, structured data or links. A copyright year does not.
  • The common mistake: one date for every URL, usually the moment the sitemap was built. 2 of the 22 sitemaps we read did it.
  • Check yours: the free sitemap checker flags invalid, future and all-identical lastmod values.

What Google does with lastmod

Google’s sitemap documentation, read on November 16, 2026, puts it in three lines:

Google ignores <priority> and <changefreq> values. Google uses the <lastmod> value if it’s consistently and verifiably (for example by comparing to the last modification of the page) accurate.

It then defines what lastmod should hold: “the date and time of the last significant update to the page. For example, an update to the main content, the structured data, or links on the page is generally considered significant, however an update to the copyright date is not.”

The sitemaps protocol at sitemaps.org says the same thing from the other side: “the date must be set to the date the linked page was last modified, not when the sitemap is generated.”

Bing explains why that sentence is there. Its webmaster blog post of February 1, 2023, The Importance of Setting the “lastmod” Tag in Your Sitemap, reported that 84% of the sitemaps Bing knew set lastmod and 18% set it wrongly, and that “the most prevalent issue” was identical values. Bing added the sentence above to sitemaps.org after finding, in its words, that “the date on most XML sitemaps was set to the date of generation of the sitemap”. Its warning: “if we observe that the dates are consistently set to the current date, we will suspect the validity of those dates and may disregard them.”

So lastmod earns its place only when it moves with the page. A date that moves with every build tells a search engine nothing.

The lastmod format

lastmod uses W3C Datetime. The note allows six forms:

  • YYYY, such as 2026
  • YYYY-MM, such as 2026-11
  • YYYY-MM-DD, such as 2026-11-16
  • YYYY-MM-DDThh:mmTZD, such as 2026-11-16T09:00+01:00
  • YYYY-MM-DDThh:mm:ssTZD, such as 2026-11-16T09:00:00Z
  • YYYY-MM-DDThh:mm:ss.sTZD, such as 2026-11-16T09:00:00.000Z

TZD is the time zone: Z for UTC, or +hh:mm or -hh:mm. Google’s Sitemaps report help lists “Invalid date” as an error and gives the rule that trips people: “Specifying time is optional (the time defaults to 00:00:00Z), but if you do specify a time, you must also specify a time zone.”

We ran common values through this pattern, plus a check that the date exists on the calendar:

^\d{4}(-(0[1-9]|1[0-2])(-(0[1-9]|[12]\d|3[01])(T([01]\d|2[0-3]):[0-5]\d(:[0-5]\d(\.\d+)?)?(Z|[+-]([01]\d|2[0-3]):[0-5]\d))?)?)?$
ValueResultWhy
2026-11-16ValidA full date
2026-11ValidYear and month
2026-11-16T09:00:00ZValidTime in UTC
2026-11-16T09:00:00.000ZValidFractions of a second are allowed
2026-11-16T09:00+01:00ValidSeconds are optional
2026-11-16T09:00:00InvalidA time with no time zone
2026-11-16T09:00:00+0000InvalidThe offset needs a colon
2026-11-16 09:00:00InvalidA space where the T goes, and no time zone
16/11/2026InvalidNot year first
Mon, 16 Nov 2026 09:00:00 GMTInvalidThe RSS date format, not W3C
2026-02-30InvalidMatches the pattern, but the date does not exist

If in doubt, write the date alone. It is valid, and a page rarely needs a lastmod more precise than the day.

We checked 22 sitemaps

On November 16, 2026 we read one sitemap file from each of 22 public sites, once, with a browser user agent: the file robots.txt names (or /sitemap.xml where it names none), and for a sitemap index its first child file with at least 10 URLs. We stopped at 2 MB a file, so the largest counts cover the start of the file.

SiteURLs readWith lastmodDifferent datesWhat it tells Google
yoast.com940940940A date per page
wpbeginner.com374374374A date per page
bbc.com (Afrique)100100100A date per page
gymshark.com118117117A date per page
wordpress.org545453A date per page
techcrunch.com200200150A date per page
developer.mozilla.org14,88514,748782Dates shared by batches of pages
wix.com9,2789,2781,561Dates shared by batches of pages
squarespace.com6,3686,2811,329Dates shared by batches of pages
hubspot.com3,0053,005748Dates shared by batches of pages
vercel.com9,5079,507339Dates shared by batches of pages
nextjs.org1,1461,14657Dates shared by batches of pages
contextbolt.com69662155A date per post, from the post’s own file
ghost.org404017Dates shared by batches of pages
theguardian.com (news)3233232Nearly one date for everything
allbirds.com (products)3133121One date for every URL
shopify.com5485481One date for every URL
astro.build34900No lastmod
webflow.com (profiles)14,26200No lastmod
stripe.com24000No lastmod
github.com37600No lastmod
notion.com11700No lastmod

What the 22 files show:

  • 17 of 22 set lastmod, and those 17 set it on 47,594 of their 47,895 URLs. Bing’s 2023 figure was 84% of sitemaps; ours is 77% of a much smaller, hand-picked sample.
  • No invalid formats and no future dates in any of the 17. Formats ranged from a bare date (TechCrunch, Squarespace, HubSpot) to milliseconds in UTC (Vercel, Next.js, Gymshark).
  • 2 gave every URL one date. allbirds.com’s product sitemap stamped 312 products with 2026-11-15T18:54:04-08:00, and shopify.com stamped 548 URLs with 2026-11-15. Both look like the time the file was built. The Guardian’s news sitemap used 2 dates across 323 articles.
  • Indexes do it too. TechCrunch’s sitemap index gives the same lastmod to all 2,064 files it lists, and MDN’s gives one date to its 10 files.
  • 5 left it out. astro.build, Webflow’s profile sitemap, Stripe, GitHub and Notion. That is allowed: the tag is optional, and no date beats a wrong one.

A shared date is not wrong in itself. Bing’s post says sites “may publish multiple pages on the same day without updating them”. Batches of pages updated together, as on MDN or Wix, can be accurate. The problem is one date for everything, refreshed on every build.

lastmod vs changefreq and priority

<changefreq> says how often a page is likely to change, and <priority> rates a page against the rest of the site. Google ignores both, in its own words above, and Astro’s sitemap integration docs repeat it: “changefreq and priority are ignored by Google.”

Keeping them does no harm. Dropping them makes the file smaller and easier to read. lastmod is the one optional tag Google still reads, so put the effort there.

How to set lastmod on your platform

  • WordPress, no SEO plugin: WordPress core adds lastmod since 6.5. The 6.5.0 sitemap code sets each post’s lastmod from its post_modified_gmt in W3C format; the 6.4.0 file has no lastmod at all. Update WordPress and it is done.
  • Yoast SEO: yoast.com’s own post sitemap, styled by the Yoast SEO plugin’s stylesheet, gave each of its 940 URLs a different date when we read it.
  • Astro: @astrojs/sitemap writes no lastmod by default; astro.build’s own 349 URLs had none. Its docs say the lastmod option sets one date “on a site-wide basis”, which is the build-date pattern above. Use serialize() to set a date per page instead.
  • Next.js: the sitemap docs open with examples that set lastModified: new Date(), which stamps every URL with the build time. Their later example uses product.date. Pass the page’s own updated date, the way that one does.

On contextbolt.com, an Astro site, serialize() looks up each URL’s content file and uses its modified date, or its date when there is none:

serialize: (item) => {
  const lastmod = lastmodMap.get(item.url.replace(/\/$/, ''));
  if (lastmod) {
    item.lastmod = lastmod;
  }
  return item;
},

That gave 621 of our 696 URLs a lastmod across 55 different dates. Pages with no content file get none, since we have no edit date to give them.

Check your sitemap’s lastmod

Open your sitemap, find a page you edited last week, and compare its lastmod with the edit. Then pick a page nobody has touched in a year. If both show today, the dates come from the build.

For the whole file, paste the address or your domain into our free sitemap checker. It reads the file the way Google does and flags invalid lastmod formats, dates in the future and files where every URL shares one date, alongside the errors that stop Google reading the sitemap at all. If Search Console already says it cannot fetch the file, start with sitemap could not be read. If you are not sure where the file is, how to find a sitemap covers the addresses to try.

Fixing lastmod pays off when Google comes back to the page. Search Console’s URL Inspection shows when Google last crawled a page, one address at a time. ContextBolt SEO gives your AI agent the same inspection, free of credits, so you can ask for the last crawl date of the pages you updated in one message. Pages Google knows about and has not fetched yet sit in Discovered, currently not indexed, and lastmod alone will not move them.

Your next step: open your sitemap, compare the lastmod of one page you edited and one you did not, and fix the date source if they match.

Where next

Frequently asked questions

Something else on your mind? Get in touch.

Does Google use lastmod in sitemaps?

Yes, when it is accurate. Google's sitemap documentation says Google uses the lastmod value "if it's consistently and verifiably (for example by comparing to the last modification of the page) accurate." It also says Google ignores priority and changefreq.

What format should lastmod be in?

W3C Datetime: a year, a year and month, a full date such as 2026-11-16, or a date and time with a time zone such as 2026-11-16T09:00:00+00:00 or 2026-11-16T09:00:00Z. Google's Sitemaps report help says the time is optional, but if you give one you must also give a time zone.

Should lastmod change when I fix a typo?

Google's documentation says lastmod should reflect the last significant update: a change to the main content, the structured data or the links counts, and a change to the copyright date does not. A typo fix is a judgment call; a rebuilt sitemap with no page change is not an update.

Is it bad if every URL in my sitemap has the same lastmod?

It makes the value useless. Bing's webmaster blog names identical dates as the most common lastmod mistake and says that if dates are consistently set to the current date it may disregard them. Google uses lastmod only when it is verifiably accurate, and one date for every page rarely is.

Should I remove changefreq and priority from my sitemap?

You can. Google's documentation says "Google ignores <priority> and <changefreq> values." Astro's sitemap docs say the same. Removing them shrinks the file and changes nothing at Google.