Most CMS platforms and sitemap plugins fill in the lastmod field automatically. Some use the date of the last database save. Others stamp every URL with the build time, so a static law firm site rebuilt nightly tells search engines that all 300 pages changed today. Neither matches what lastmod is supposed to mean.

Google said in 2023 that it uses lastmod when the value is consistently and verifiably accurate, and that it ignores the priority and changefreq fields. On a criminal defense firm's site, a charge page may sit unchanged for months and then get a meaningful legal update, so an honest lastmod is one of the few sitemap signals worth getting right. This post covers how to store it and how to generate it.

What should count as a change

Google's guidance ties lastmod to significant changes, such as changes to the main content, the structured data or the links on a page. A new copyright year in the footer does not qualify. A rewritten penalties section on a DUI page does.

On a law firm site, agree on the definition with the people who edit content. A reasonable rule set:

  • Change the date when body content, legal facts, FAQ answers or structured data change
  • Leave it alone for template, navigation, footer or styling changes
  • Leave it alone for typo fixes that do not change meaning
  • Change it when links in the body are added or removed

Write the rule down. Developers and content editors will otherwise each assume someone else is handling it.

Store the date as content

The cleanest approach is a dedicated field, something like content_updated_at, kept separate from the CMS's own updated timestamp. Editors set it, or the CMS sets it when a "meaningful change" checkbox is ticked on save. The database's updated_at stays as an audit field and never reaches the sitemap.

For a static site built from Markdown, put the date in front matter and treat it the same way:

--- title: "Second-Degree Assault Charges in Example County" content_updated: 2026-11-10 legal_review: 2026-11-10 --- 

For an existing site, backfill the field once. Pull the last meaningful edit from revision history where the CMS keeps it. For pages with no reliable history, use the date of the last known legal review, or leave the field empty until the next review sets it.

A separate legal_review date is useful on charge pages. The page can show readers when a lawyer last checked it, and your team can query every page whose review is older than a set limit.

Generate the sitemap from that field

At build or request time, read the content date for each URL and write it in W3C Datetime format. A date alone, such as 2026-11-10, is valid. If you include a time, include the timezone offset too.

Leave lastmod off a URL entirely if you do not have a trustworthy date for it. A missing value is better than an invented one. Do not fall back to file modification times on a build server, since a fresh checkout resets them and every page appears changed.

Check that the sitemap lists only canonical, indexable URLs that return a 200 status. A lastmod on a redirected or noindexed URL is wasted.

Tie it to the editorial review cycle

The date only stays honest if editing habits support it. Many defense firms review charge and court pages on a schedule, and those reviews often produce real content changes. A post on setting a review schedule for every charge and court page covers how to plan that cycle. Connect the sitemap date to the same workflow, so a completed review that changes the page also updates the field.

When a review finds nothing to change, record it in legal_review and leave content_updated alone. The sitemap should reflect changes to the page, not visits from your own editors.

Checking that it works

After deploying, compare a sample of sitemap dates against the real edit history for the same pages. The Sitemaps report in Search Console shows when Google last read the file, though it does not tell you whether Google trusts your dates. Watch the Crawl stats report in the following weeks for activity on pages you updated.

If you previously stamped every page with the build date, expect Google to take a while to trust the field again. Months of consistent values are what earn that trust back.

Questions about lastmod on law firm sites

Does a newer lastmod make Google rank a page higher?

No. It can help Google decide when to recrawl a page, which matters after a legal update, but it is not a ranking boost.

Should I still ping Google when the sitemap changes?

Google retired its sitemap ping endpoint in 2023. Submit the sitemap in Search Console and reference it in robots.txt.

What about IndexNow?

Bing and some other search engines accept IndexNow notifications for changed URLs. Google does not use it. The same honest content date can drive both.

SBD Marketing works only with criminal defense firms, one firm per city, and helps them with website design, SEO for the charges they defend, visibility in AI search tools and SEO audits. Its notes on technical SEO for law firms cover more of this kind of work.