How to add a publication date to a page
A publication date is a visible date on an article, matched by datePublished and dateModified in its JSON-LD. SeenLens checks article pages only and reports an info result when no date is found. Fixing it takes about five minutes per template: print a date in the page and put the same dates in the structured data.
By SeenLens · Last updated
Run the free 43-check scan on your page
What does the publication date check test?
The check first decides whether the page is an article. It treats a page as an article when it has Article, BlogPosting or NewsArticle JSON-LD, an article element, an article:published_time meta tag or a time element with a datetime attribute. A page with none of these signals gets 'not applicable', and the check does not count against the score.
For an article, SeenLens looks for a date in the main text and the markup. It passes when it finds one. It reports 'info', the lowest severity, when it finds none. The check has low weight (priority P3, weight 1 in the content dimension).
Google defines a byline date as the date it estimates the page was published or updated. Its guidance asks for a visible date with a label such as 'Published' or 'Last updated', and for datePublished or dateModified in the markup of a CreativeWork type such as Article. The visible date and the markup date must match. Google asks for ISO 8601 timestamps, with a correct timezone if you include a time.
Do dates help AI answers?
Real updates may help, and a changed stamp alone does not. Ahrefs studied about 17 million cited URLs (published 2025-07-28). AI assistants cited fresher URLs than organic Google results, 1,064 days since publication on average against 1,432 days, but Google AI Overviews were the exception. No study isolates the effect of dateModified markup. Google's AI optimization guide does not list dates as a visibility factor.
Use dates to inform readers and to meet Google's byline date guidance. Do not change a date without changing the content.
How do I check for a date?
curl -s https://example.com/blog/post | grep -oiE 'datePublished|dateModified|article:published_time|<time[^>]*datetime="[^"]*"'No output means the page has no date signal in its HTML. You can also run the scan. The evidence line prints the date it found.
How do I add a publication date?
Add a visible date and the same dates in JSON-LD. Use the date of the first publication for datePublished. Use the date of the last real edit for dateModified.
<p>Published <time datetime="2026-11-06">6 November 2026</time>.
Last updated <time datetime="2026-11-06">6 November 2026</time>.</p>
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "Article",
"headline": "How to add a publication date",
"datePublished": "2026-11-06",
"dateModified": "2026-11-06"
}
</script>Next.js
Store both dates in your content data. Print them and reuse the same values in the JSON-LD object so the two never differ. See add JSON-LD for the script tag.
const jsonLd = {
"@context": "https://schema.org",
"@type": "Article",
headline: post.title,
datePublished: post.published,
dateModified: post.updated,
};
<p>Last updated <time dateTime={post.updated}>{formatDate(post.updated)}</time></p>WordPress
Most themes print the post date by default. If yours hides it, turn on the post meta or date option in the theme settings or the Site Editor (the Post Date block). SEO plugins such as Yoast SEO add Article schema with the post dates to posts. Yoast documents that its schema graph adds an Article piece with dates on blog posts. Confirm the output in the page source.
Shopify
Blog articles in Shopify have published_at and updated_at fields. In the article template, print them with the time_tag filter. The structured_data filter converts an article object to Article JSON-LD.
<p>Published {{ article.published_at | time_tag: format: 'date' }}</p>
<script type="application/ld+json">
{{ article | structured_data }}
</script>Static sites
Add date and updated fields to the front matter of each page. Print them in the layout and write the JSON-LD from the same fields.
How do I verify the fix?
- Run the curl command again. You must see the date fields.
- Test the page in the Rich Results Test or the Schema Markup Validator. Both dates must parse.
- Scan the page with SeenLens. The check passes when it reads a date from the page.
When can I ignore this check?
Skip dates on pages that are not articles, such as a pricing page, a tool or a home page. SeenLens marks those as not applicable. Do not publish a fake date to pass the check. A wrong date breaks Google's guidance, which asks for dates that match the content.
Sources
- Google Search Central: Influence your byline date in Google Search (visible date, datePublished and dateModified, ISO 8601, dates must match; checked 2026-11-06)
- Ahrefs: Do AI assistants prefer to cite fresh content? (study of about 17 million cited URLs, published 2025-07-28; checked 2026-11-06)
- Yoast developer docs: Schema functional specification (Article piece with dates on posts, checked 2026-11-06)
- Shopify Liquid: structured_data filter (article converts to schema.org Article, checked 2026-11-06)
- Shopify Liquid: time_tag filter (time element with datetime attribute and format values, checked 2026-11-06)