In short
The modification date shown on a page must say when its content actually changed: an updated price, a corrected rule, a rewritten section. It must not move with every save, every deployment or every cache rebuild, and it must move when injected data changes the page's main information. Once this is done, every time-sensitive page (guide, pricing, terms, documentation) shows a labeled date taken from an editorial field, and an automated check flags false dates.
Why it matters
Most CMSs and site generators display a technical date: the last database write, the last commit, the build date. This date is wrong in both directions.
- Too recent: fixing a comma, updating a plugin or deploying again gives every page today's date. Readers believe the information has been checked when it has not. In its guide to helpful content, Google cites changing a page's date without substantial changes as a practice to avoid.
- Too old: a price injected from a central source changes, but the date shown remains the one from when the page was written. Readers think the page is out of date when it is accurate.
Google's documentation on byline dates asks for a visible, prominent, labeled date (“Published”, “Updated”), identical to the one in the structured data, never in the future, and for other dates on the page to be kept to a minimum. Google estimates the date from several signals: a consistent displayed date helps, with no guarantee that Google will show it.
For generative engines, a reliable date helps decide between two sources that contradict each other. None of them publishes how it weighs dates: the effect is plausible but undocumented.
What it improves
- Reader trust The date genuinely says when the information was reviewed.
- Date shown by Google A better chance that it is correct, with no guarantee it is displayed.
- AI answers An honest freshness cue for assistants that read the page. Undocumented effect.
- Content management Real dates reveal pages that have not been reviewed in a long time.
- Rankings No direct effect from a displayed date.
How to check
This script goes through the sitemap, loads each page twice and flags suspicious dates: a dateModified that changes from one load to the next, a future date, a date earlier than publication, and dates shared by a large number of pages (a sign of a deployment or mass regeneration). Save it as audit-dates.py:
import collections, re, sys, time, urllib.request
from datetime import datetime, timezone
def fetch(url):
request = urllib.request.Request(url, headers={"User-Agent": "audit-dates"})
return urllib.request.urlopen(request, timeout=20).read().decode("utf-8", "replace")
def first(pattern, html):
match = re.search(pattern, html)
return match.group(1) if match else None
sitemap = fetch(sys.argv[1])
urls = re.findall(r"<loc>([^<]+)</loc>", sitemap)
now = datetime.now(timezone.utc)
days = collections.Counter()
for url in urls:
html = fetch(url)
time.sleep(1)
modified = first(r'"dateModified"\s*:\s*"([^"]+)"', html)
published = first(r'"datePublished"\s*:\s*"([^"]+)"', html)
if not modified:
continue
if first(r'"dateModified"\s*:\s*"([^"]+)"', fetch(url)) != modified:
print(f"CHANGES ON EVERY LOAD {url}")
try:
parsed = datetime.fromisoformat(modified.replace("Z", "+00:00"))
except ValueError:
print(f"NOT ISO 8601 {url} {modified}")
continue
if parsed.tzinfo and parsed > now:
print(f"FUTURE DATE {url} {modified}")
if published and modified[:10] < published[:10]:
print(f"EARLIER THAN PUBLICATION {url}")
days[modified[:10]] += 1
for day, count in days.most_common(3):
if count > max(10, len(urls) // 5):
print(f"{count} pages modified on {day}: check that these are real updates")
Run it with python3 audit-dates.py https://example.com/sitemap.xml. If the sitemap is an index, pass the URL of a child sitemap.
Then check three recently updated pages by hand: does the visible date near the title match dateModified and the real date of the last substantive change?
How to implement
Before you start
Which pages carry a date. Every page whose value depends on freshness, not just articles:
| Page type | Suggested label | Note |
|---|---|---|
| Article, guide, FAQ | “Published” and “Updated” | See display actual publication and update dates (opens in a new tab) |
| Pricing page | “Prices effective as of” | The date changes with the price list, not with the layout |
| Terms of sale, policies | “Version effective as of” | Keep previous versions, dated |
| Documentation | “Updated” | Add the product version described |
| Home, contact, product page | No date | A date does not help the reader there |
Where the date comes from. An editorial field separate from the technical date, filled in by the person making the substantive update. The rules that trigger it (updated figure, added section, corrected error: yes; typo, layout: no) are those of your style guide and of the check update dateModified (opens in a new tab). The same value feeds the visible date, dateModified and lastmod.
Reference HTML format:
<p class="page-dates">
Updated <time datetime="2026-11-20T10:30:00+01:00">November 20, 2026</time>
</p>
Good to know: “Checked on” is not “Updated”. If you review a page without changing anything, do not touch the main date. You can write “Prices checked on November 3, 2026” in the caption of a data table, but keep a single prominent date near the title: Google recommends keeping other dates on the page to a minimum.
WordPress
Versions WordPress 6.5 and later.
WordPress updates the modification date on every save. Add an editorial date in a custom field content_updated_at (the “Custom Fields” panel, which you enable in the editor's preferences, with a value in the format 2026-11-20 10:30), then have it used everywhere WordPress displays the modification date. In a site functionality plugin:
add_filter('get_the_modified_date', function ($date, $format, $post) {
$post = get_post($post);
$editorial = $post ? get_post_meta($post->ID, 'content_updated_at', true) : '';
if ($editorial === '') {
return $date;
}
$timestamp = (new DateTimeImmutable($editorial, wp_timezone()))->getTimestamp();
$format = $format !== '' ? $format : get_option('date_format');
return wp_date($format, $timestamp);
}, 10, 3);
The Date block, set to display the last modified date, goes through get_the_modified_date() and shows nothing if the modification date is not later than the publication date: add it to the single post template in Appearance > Editor > Templates. In a classic theme, use get_the_modified_date() in the template, as described in the check on displaying dates. Then align your SEO plugin's structured data with this same field.
Shopify
Versions Shopify admin and Online Store 2.0 themes, November 2026.
article.updated_at changes with every edit to the article, and the page object only exposes published_at. Create a Date metafield definition for pages and blog posts (Settings > Metafields and metaobjects), for example custom.content_updated_at, then display it in the page section (sections/main-page.liquid in themes derived from Dawn):
{%- assign updated = page.metafields.custom.content_updated_at.value -%}
{%- if updated != blank -%}
<p class="page-dates">
Updated
<time datetime="{{ updated | date: '%Y-%m-%d' }}">{{ updated | date: '%d/%m/%Y' }}</time>
</p>
{%- endif -%}
For a blog post, replace page with article in sections/main-article.liquid. The writer fills in the metafield at the bottom of the page or blog post editing screen, only for a substantive update.
Drupal
Versions Drupal 10 and 11.
The changed field of a content item changes on every save. Add a Date field to the content type (Structure > Content types > Article > Manage fields), named for example field_content_updated, and display it in Manage display instead of the modification date, with a readable date format. In the Metatag module, use this field's token for dateModified instead of [node:changed]. Clear the caches after the change.
Laravel
Versions Laravel 11 to 13.
Add a content_updated_at column to the relevant models (articles, pages, documentation), separate from updated_at, as shown in the check on displaying dates. To display it the same way on every page type, create a Blade component resources/views/components/content-date.blade.php:
@props(['date', 'label' => 'Updated'])
@if($date)
<p class="page-dates">
{{ $label }}
<time datetime="{{ $date->toIso8601String() }}">{{ $date->translatedFormat('j F Y') }}</time>
</p>
@endif
Usage: <x-content-date :date="$page->content_updated_at" label="Prices effective as of" />. Never tie this column to an observer that sets it on every save(): that would recreate the technical date.
Next.js
Versions Next.js 15 and 16 (App Router).
Store the date in the CMS or in the front matter (updated: 2026-11-20) and display it with a fixed time zone to avoid a one-day shift depending on the build server:
const formatDate = (iso: string) =>
new Intl.DateTimeFormat('fr-FR', { dateStyle: 'long', timeZone: 'Europe/Paris' }).format(new Date(iso));
export function ContentDate({ updated }: { updated?: string }) {
if (!updated) {
return null;
}
return (
<p className="page-dates">
Updated <time dateTime={updated}>{formatDate(updated)}</time>
</p>
);
}
Do not use the build date or new Date() without an argument.
Astro
Versions Astro 5 and later.
Same principle: an updated field in the content collection schema, displayed in the template. Astro's official recipe for the last modified date reads the date of the file's last Git commit: it also changes for a typo or a reformat. Keep it as a fallback when the updated field is missing, not as the main source.
Static sites and documentation generators
- Hugo:
.Lastmodfollows the order set in the configuration; by default, the Git date (:git, ifenableGitInfois enabled) comes before thelastmodfield. Reverse the order so that the editorial date takes precedence:
[frontmatter]
lastmod = ['lastmod', ':git', 'date', 'publishDate']
- Docusaurus:
showLastUpdateTimedisplays the date of the last commit; thelast_updatefield in a page's front matter overrides it when you want to enforce the editorial date.
Common mistakes
- Displaying the technical date from the CMS or the last commit, which moves for a typo.
- Build date on every page of a static site.
- Not changing the date when injected data changes the page's main information.
- Changing the date after a simple review: that is a “checked on” date, not an “updated” date.
- Several prominent dates near the title, without labels.
- Displayed date different from
dateModifiedand the sitemaplastmod. - No fixed time zone in the formatting, which shifts the date by one day.
Frequently asked questions
Why do all my pages show the same update date?
If every page shows the same update date, the site is using a technical date: the build date of a static site, the deployment date, a cache regeneration or a bulk database update. Replace it with an editorial field that is filled in only when the content changes substantively. The audit script in this guide flags dates shared by an abnormal number of pages.
Should I change a page's date when I review it without changing it?
No, a review without changes does not change the update date. If the check itself has value, for example for a price list, write “Prices checked on” in the caption of the table concerned, but leave the main date and dateModified unchanged. Changing the date of a page whose content has not changed is a practice Google cites as one to avoid.
Should pricing pages and terms of sale show a date?
Yes, a date is useful on pricing pages and terms of sale, because readers need to know which version applies. Use a suitable label, such as “Prices effective as of” or “Version effective as of”, and change the date only when the price list or the text changes. For terms of sale, keep previous versions dated and available to customers who accepted them.
Is the date of the last Git commit a good modification date?
The date of the last Git commit is a good fallback, but not a good main source: it also changes for a typo, an automatic reformat or a file rename. Prefer an editorial date field in the front matter or the CMS, filled in for substantive changes, and only fall back on the Git date when that field is missing.
Resources
- Google Search Central: Influencing your byline dates in Google Searchdevelopers.google.com
- Google Search Central: Creating helpful, reliable, people-first contentdevelopers.google.com
- MDN: The time elementdeveloper.mozilla.org
- WordPress: get_the_modified_date filterdeveloper.wordpress.org
- Shopify: Liquid page objectshopify.dev
- Astro: Add last modified timedocs.astro.build
- Hugo: Front matter configurationgohugo.io
Updated on
Topic checklist (PDF)