In short
dateModified is the schema.org property that gives the date a piece of content was last modified in the structured data. It must change when the content changes substantially, and only then. Once this is done, each template outputs a single dateModified value, taken from the same editorial date as the displayed date and the sitemap lastmod, in ISO 8601 format with a time zone, and an automated check blocks dates that are in the future, inconsistent or generated at build time.
Why it matters
Google recommends datePublished and dateModified in its Article structured data and uses them, along with other signals, to estimate the date to show in its results. Its documentation on dates asks for the structured data date to match the visible date and never to be in the future.
Three defects come up often:
- The value moves for no reason. The CMS takes the date of the last save, the generator the build date. Every page seems to have been modified on deployment day. Google cites changing the date without substantial changes as a practice to avoid.
- The value does not move when it should. An injected price list changes, and so does the page, but
dateModifiedkeeps the date the page was written. - Several values coexist. The theme outputs an
Articlewith one date, the SEO plugin aWebPagewith another. Google then chooses on its own, or ignores both.
dateModified is also one of the few machine-readable freshness metadata that a generative engine can extract from a page. None of them documents how it uses it: the GEO (Generative Engine Optimization) effect remains indirect.
What it improves
- Date shown by Google A better chance that it is correct. No guarantee it is displayed.
- Signal consistency Visible date, markup and sitemap tell the same story.
- AI answers An accurate freshness cue for the tools that read it. Undocumented effect.
- Trust No “updated today” on a page that has not changed in two years.
- Rankings No documented direct effect.
How to check
Count the dateModified values on a page:
curl -s https://example.com/guides/choisir-the-vert/ | grep -o '"dateModified" *: *"[^"]*"' | sort | uniq -c
Compliant result: a single distinct value (it may appear in two nodes, WebPage and Article), in ISO 8601 format with a time zone, equal to the displayed date.
2 "dateModified": "2026-11-20T10:30:00+01:00"
Two different values point to two competing markup generators. Then reload the page a minute later: a value that changes reveals a date generated per request. The Rich Results Test shows the dates read in the Article item. For the whole site, use the audit script from the check display the actual modification date (opens in a new tab).
How to implement
Before you start
When the date changes. Write the rule into the editorial style guide:
| Change | Does dateModified change? |
|---|---|
| Figure, price, rule, version or contact detail updated | Yes |
| Section added, rewritten or removed | Yes |
| Factual error corrected | Yes |
| Typo, link replaced, decorative image | No |
| Layout, theme, plugin, deployment | No |
| Review with no change | No |
Where the property applies. schema.org defines dateModified on CreativeWork and its subtypes: Article, BlogPosting, NewsArticle, WebPage and its variants (AboutPage, FAQPage, ItemPage…), Dataset, SoftwareApplication. It does not exist on Product, Organization or LocalBusiness: on a product page, the WebPage node can carry it.
Format. ISO 8601, ideally with the time and time zone, daylight saving time included:
| Value | Verdict |
|---|---|
2026-11-20T10:30:00+01:00 |
Compliant |
2026-11-20T09:30:00Z |
Compliant (UTC) |
2026-11-20 |
Accepted, less precise |
20/11/2026 or 2026-11-20 10:30 |
Not compliant |
A single source. The same editorial date feeds the visible date, every node that carries dateModified and the sitemap lastmod. Full article markup is detailed in specify authors, publisher, dates and images (opens in a new tab).
WordPress
Versions WordPress 6.4 and later, Yoast SEO and Rank Math up to date.
Yoast SEO and Rank Math fill dateModified with the WordPress modification date, which changes on every save. With an editorial field content_updated_at (see the check on displaying the date), force the value in the markup from a site functionality plugin:
function site_editorial_modified(): ?string
{
$post = get_post();
if (! $post) {
return null;
}
$value = get_post_meta($post->ID, 'content_updated_at', true);
if ($value === '') {
return null;
}
return (new DateTimeImmutable($value, wp_timezone()))->format(DATE_ATOM);
}
$replaceDate = function (array $data): array {
$date = site_editorial_modified();
if ($date !== null) {
$data['dateModified'] = $date;
}
return $data;
};
add_filter('wpseo_schema_article', $replaceDate);
add_filter('wpseo_schema_webpage', $replaceDate);
add_filter('rank_math/json_ld', function (array $data, $jsonld): array {
$date = site_editorial_modified();
if ($date === null) {
return $data;
}
foreach ($data as $key => $node) {
if (is_array($node) && isset($node['dateModified'])) {
$data[$key]['dateModified'] = $date;
}
}
return $data;
}, 99, 2);
Keep only the filters for the plugin you have installed. DATE_ATOM outputs the format 2026-11-20T10:30:00+01:00 with the time zone set in Settings > General. Rank Math also offers an option in the editor to lock the modified date, which avoids changing it for a minor correction: check how it behaves in its documentation. Clear the page cache after the change.
Shopify
Versions Online Store 2.0 themes, November 2026.
article.updated_at changes on every save. With a Date metafield custom.content_updated_at on blog posts, use it in the JSON-LD block of sections/main-article.liquid, falling back to the publication date:
{%- assign modified = article.metafields.custom.content_updated_at.value | default: article.published_at -%}
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "BlogPosting",
"headline": {{ article.title | json }},
"datePublished": {{ article.published_at | date: '%Y-%m-%dT%H:%M:%S%:z' | json }},
"dateModified": {{ modified | date: '%Y-%m-%dT%H:%M:%S%:z' | json }}
}
</script>
If the theme already calls the structured_data filter for the article, remove that call to avoid two markups with different dates. A Date metafield without a time produces midnight in the store's time zone: that is valid.
Drupal
Versions Drupal 10 and 11, Metatag and Schema.org Metatag modules.
The token [node:changed:html_datetime] follows every save. With an editorial Date field (field_content_updated), open Configuration > Search and metadata > Metatag, the configuration for the content type, Schema.org Article or WebPage section, and use the field's token for dateModified, for example [node:field_content_updated:date:html_datetime] (Token module). Clear the caches.
Laravel
Versions Laravel 11 to 13.
The editorial date is set only if the writer ticks “Substantial update” in the edit form:
public function update(UpdatePostRequest $request, Post $post): RedirectResponse
{
$post->fill($request->safe()->except('substantial_update'));
if ($request->boolean('substantial_update')) {
$post->content_updated_at = now();
}
$post->save();
return redirect()->route('admin.posts.edit', $post);
}
In the form: <input type="checkbox" name="substantial_update" value="1">, and 'substantial_update' => ['boolean'] in the validation rules. The markup then reads ($post->content_updated_at ?? $post->published_at)->toIso8601String(), like the displayed date. If pages are cached, invalidate the cache of the page concerned in the same action.
Next.js
Versions Next.js 15 and 16 (App Router).
Read the date from the CMS or the front matter (updated), never from new Date():
const jsonLd = {
'@context': 'https://schema.org',
'@type': 'BlogPosting',
headline: post.title,
datePublished: post.published,
dateModified: post.updated ?? post.published,
};
Then add a check after the build. This script goes through the generated HTML files and fails if a page has several dateModified values, a future date, a date earlier than publication, or if more than half the pages are dated today (a sign of a build date). Save it as scripts/check-dates.mjs:
import { readdir, readFile } from 'node:fs/promises';
import { join } from 'node:path';
const root = process.argv[2] ?? 'out';
const today = new Date().toISOString().slice(0, 10);
const errors = [];
let pages = 0;
let datedToday = 0;
async function* htmlFiles(dir) {
for (const entry of await readdir(dir, { withFileTypes: true })) {
const path = join(dir, entry.name);
if (entry.isDirectory()) {
yield* htmlFiles(path);
continue;
}
if (entry.name.endsWith('.html')) {
yield path;
}
}
}
for await (const file of htmlFiles(root)) {
const html = await readFile(file, 'utf8');
const modified = [...html.matchAll(/"dateModified"\s*:\s*"([^"]+)"/g)].map((match) => match[1]);
const published = html.match(/"datePublished"\s*:\s*"([^"]+)"/)?.[1];
if (modified.length === 0) {
continue;
}
pages++;
const value = modified[0];
if (new Set(modified).size > 1) {
errors.push(`${file}: several dateModified values`);
}
if (new Date(value) > new Date()) {
errors.push(`${file}: future date ${value}`);
}
if (published && new Date(value) < new Date(published)) {
errors.push(`${file}: dateModified earlier than datePublished`);
}
if (value.slice(0, 10) === today) {
datedToday++;
}
}
if (pages > 10 && datedToday / pages > 0.5) {
errors.push(`${datedToday} of ${pages} pages dated today: build date?`);
}
errors.forEach((error) => console.error(error));
process.exit(errors.length > 0 ? 1 : 0);
Run node scripts/check-dates.mjs out after a static export. For a server-rendered site, audit the live pages with the script from the check on displaying the date. The “today” threshold may trigger on a day with a genuine bulk update: adjust it to your publishing pace.
Astro
Versions Astro 5 and later.
Declare updated in the content collection schema (z.coerce.date().optional()), use entry.data.updated ?? entry.data.published in the template's JSON-LD, and run the script from the Next.js section on the dist folder after astro build.
Common step: what goes with every update
A substantive change triggers, in the same operation:
- The editorial date, which feeds the visible date and
dateModified. - The URL's
lastmodin the sitemap: see update lastmod (opens in a new tab). - Purging the page cache and the CDN for that URL.
- For search engines that support it, a notification: see notify compatible search engines via IndexNow (opens in a new tab).
- For an important page, an indexing request from the URL Inspection tool in Search Console.
Caution: changing
dateModifiedwithout changing the content is a fictitious date, even if it is done “to show that the page has been checked”. See eliminate fictitious update dates (opens in a new tab).
Common mistakes
dateModifiedequal to the build or request date on every page.- Two competing markups (theme and plugin) with two different dates.
- Local format (
20/11/2026) or a time without a time zone. dateModifiedearlier thandatePublished, often after a republication or a migration.- Future date, for example a scheduled publication date copied as is.
dateModifiedon aProductnode: the property does not exist there.- Forgetting the cache: the corrected markup is only served after a purge.
- Marked-up date different from the displayed date or from
lastmod.
Frequently asked questions
What is the difference between dateModified and lastmod?
dateModified is a schema.org structured data property, placed in the page, that gives the date the content was last modified. lastmod is an XML sitemap tag that tells crawlers when a URL changed. Both must carry the same date, taken from the same editorial date, and change only when the page's content is modified substantially.
Can I put dateModified on a product page?
The dateModified property does not exist on the schema.org Product type: it applies to CreativeWork types, such as Article or WebPage. On a product page, you can place it on the page's WebPage node, with the date of the last real change to the page. Prices and availability, on the other hand, are described in the product's Offer, which follows its own update pace.
Why does Google show a date other than dateModified?
Google chooses the displayed date from several signals, including the visible date and the structured data, and may pick another one if the page contains several dates, if two markups contradict each other or if the visible date differs from dateModified. Align the displayed date, dateModified and lastmod on the same value, remove duplicate markup and keep other prominent dates to a minimum.
Should dateModified change when a price injected into the page changes?
Yes, if the price is part of the page's main information, as on a pricing page or a price guide: that is a substantial change. No, if the value is only a secondary detail repeated on many pages, such as a starting price in a sidebar. Updating dateModified across the whole site every time a shared value changes amounts to producing meaningless dates.
Resources
- Google Search Central: Influencing your byline dates in Google Searchdevelopers.google.com
- Google Search Central: Article structured datadevelopers.google.com
- Schema.org: dateModifiedschema.org
- Yoast: WebPage piece and Article piecedeveloper.yoast.com
- Rank Math: filters and hooks for developersrankmath.com
- Drupal: Metatag moduledrupal.org
- Next.js: JSON-LDnextjs.org
Updated on
Topic checklist (PDF)