Payments are experiencing issues due to temporary restrictions in Russia. If your payment does not go through, please submit a support request.Our support team is available 24/7 — we are always here to help with hosting and server issues.We are now accepting requests for dedicated server rental and colocation services in our data center.Reminder: we recommend enabling backups for additional data protection.A new VPS/VDS lineup with NVMe storage and improved performance is now available.Maintenance work on some servers has been completed. All services are operating normally.
Article8 min readViews1

lastmod in Sitemap: Which date to set for a page and when to update it

Why the Sitemap generation date differs from the page date, which changes count as significant, and how to verify CMS logic across multiple URLs.

Comments 0

A metal stamp for marking dates next to a stack of sheets, one of which bears an orange impression.
In this article

Short answer: lastmod should show the date of the last significant change to a specific page, not the time the Sitemap generator was launched. For dynamic URLs, the working rule is: select the data on which the visible and indexable content of the page depends, and take the latest of their change dates.

If a CMS sets today's date for all URLs every night, the file may remain formally correct, but the signal becomes unverifiable. The opposite extreme is also problematic: a publication date that never changes fails to reflect updates to price, description, or structured data.

Here is the interesting part: the issue is usually not the date format, but that the generator was not told which events actually change the page.

What search engines confirm

In the Sitemap protocol, the lastmod tag is optional. Its value must relate to the change of the linked page, not the moment the file itself was created. The W3C Datetime format is allowed; the time can be omitted, leaving only the date in the format YYYY-MM-DD.

Google clarifies in the Sitemap documentation: the value is used when it is consistent and accurately verifiable. Updating main content, structured data, or links on a page is typically considered significant, whereas changing the year in a copyright notice is not. Yandex Webmaster Help also describes lastmod as an optional last update date for the page.

This does not guarantee a faster recrawl, indexing, or ranking growth. A Sitemap reports URLs and changes, but the decision to fetch and process a page remains with the search engine. Having a URL in the file, an HTTP 200 response, crawling, and indexing are distinct states.

If you need to examine this specific boundary in detail, it is covered in the article about a URL that exists in the Sitemap but does not appear in search. The task here is to ensure the page date is honest and reproducible.

Which changes should update the date

A universal "has something changed" switch is not enough. What matters is whether the response for this URL has changed for the visitor or search engine bot. The matrix below is not a replacement for project logic, but a way to agree on that logic before fixing the generator.

The first three rows of the table are based on Google examples. Decisions on price, stock, comments, and minor edits below are a practical interpretation: they must be verified against the actual page response and the specific project rules.

Event

Change lastmod?

Why

Main text or characteristics have been rewritten

Yes

The main content of the page has changed

Structured data updated

Yes

The indexable signal changed, even if the visible text is almost the same

A significant link was added or removed

Usually yes

Google considers link changes significant; context matters

Visible price or product availability changed

Yes, if it appeared on the page

The card changed; structured data may have changed as well

The product inventory changed only in the internal system

No, the page response remains the same

The background operation alone did not change the URL

A comment was added

It depends

If comments make up a significant part of the page, yes; a short administrative comment may not require an update

A typo was fixed without changing the meaning

Usually not

Minor edits do not have to trigger a significant update

The copyright year has changed

No

Google explicitly cites this as an insignificant change

The sitemap was simply regenerated

No

The sitemap generator start time does not equal the page modification date

Disputed cases should be resolved consistently for the entire page type and documented as a rule. For example, for reviews, consider only published reviews, not the date the moderator's reply was received. For the main menu, change the date of dependent URLs only when links change significantly, not with every template rebuild.

Where to get the date for different pages

For dynamic URLs, the Sitemap protocol's FAQ suggests calculating the date based on changes to the source data or using a justified approximation for periodic updates. In practice, a convenient model is lastmod(URL) = max(t1, t2, …), where t1, t2, and other values are timestamps of only relevant changes. The word "relevant" here is more important than the max function.

URL Type

Date Source Candidates

What Not to Take Automatically

Article

text, images, structured data, significant links

author login to the CMS without editing, cache rebuild, year in the footer

Product Card

description, specifications, visible price, availability, images, product markup

exchange with 1C if the final response has not changed

Category

composition and order of visible products, SEO text, filters, and significant links

any change to a product not included in this category

Static page

version of the content or file, published edition

time of file change after copying, if the content has not changed

Educational example. The card text was changed on November 12 at 10:15, the price on November 14 at 08:40, and the image on November 13 at 17:20. If all three changes are visible on the card, its date is November 14 at 08:40. If the price updated only in the accounting system while the site continues to serve the old value, do not use November 14: first, determine why the data did not reach the page.

For a category, do not blindly take the maximum date of any product in the catalog. You need the maximum only for products and fields that specifically form that URL. Otherwise, a change to a hidden product or one missing from the category will update the date of another page.

How to test the generator on five URLs

Verification begins with observation, not mass database edits. Select one URL of each type: an article, a product, a category, a static page, and a page with comments or reviews. If a specific type is missing from the site, replace it with the closest dynamic template.

  1. Preserve the current lastmod values and the actual dates of the last significant changes. Explicitly note the source of each date.

  2. Run a standard Sitemap regeneration without altering the content. The selected URL values must remain unchanged.

  3. Select a page that participates in the same Sitemap generator but does not serve a critical user scenario. Record the original value of the editable field and document how to restore it. Apply a single controlled content change; after verification, revert to the original value if the edit was not intended to be permanent. Do not use a customer order, real payment, or a bulk catalog update.

  4. Wait for the standard page and Sitemap update. Verify that the date has changed for the target URL and only for those pages that genuinely depend on this change.

  5. Compare the format and time zone. If only YYYY-MM-DD is used, record the loss of intra-day precision and do not attempt to reconstruct a fictional time.

  6. Regenerate without new changes. The date must remain stable again.

This protocol checks two things: that the generator does not create freshness solely from the fact of a launch, and that it does not miss significant updates. It is not a test for a specific CMS until the team has actually run it and recorded the input data and observed result.

How to read the result

If all five dates update after an empty regeneration, the likely defect is the use of the job time, XML write time, or the project's general update date. The fix must be sought in the data source, not in the schedule.

If the date does not shift after a card change, check the chain: was the change published, was the cache cleared, did structured data update, and which table or event does the generator read? A product publication date may not be aware of a price change in a separate register.

If the product card and all categories change simultaneously, this is not necessarily an error. The composition, price, or availability of the product may be visible in the categories. However, the dependency must be explained by the content of each URL, not by the convenience of querying the database.

When the logic can be considered corrected

  • Regenerating without changes does not move page dates.

  • A significant change updates the target URL and explainable dependent pages.

  • A minor administrative operation does not create a new date.

  • Each value can be linked to a specific data source and rule.

  • The date format is valid, and the time zone and precision are documented.

  • The team does not treat a lastmod update as confirmation of a re-crawl or indexing.

If the same incorrect date is already being generated en masse by multiple templates, first save the original selection and dependency rules, then correct a limited group of URLs. In case of a systemic issue, you can move the check to a separate SEO audit, but the useful result of such an audit here is not the number of warnings, but a reproducible explanation for each date.

If your own team lacks access to the generator or data map, a site audit is useful for analyzing technical signals.

However, you should still start with five URLs: they quickly show what determines the date—whether it is a page change or just a schedule.

Discussion 0

Share your experience and ask questions. Comments without links appear after editorial review.

No comments yet. Start the discussion.