# Blog posts and articles have datePublished and dateModified in schema

- **Pattern:** `ab-002505` (`seo-advanced.link-architecture.content-dating`)
- **Severity:** low
- **Lifecycle:** active
- **Last modified:** 2026-04-18
- **Canonical URL:** https://auditbuffet.com/patterns/ab-002505
- **License:** CC-BY-4.0 — attribute to AuditBuffet Pattern Catalog (https://auditbuffet.com/patterns/ab-002505)

## Why it matters

Blog posts and articles without `datePublished` in schema-org BlogPosting are ineligible for date display in SERPs, which reduces click-through rate for time-sensitive content. Search engines use `dateModified` to determine crawl priority — pages without it are treated as stale after initial indexing, regardless of actual content freshness. A `dateModified` value earlier than `datePublished` is a schema error that signals unreliable metadata to indexers. For editorial sites where recency is a ranking signal, missing or inconsistent dates are a systematic findability disadvantage against competitors who maintain accurate temporal metadata.

## Severity rationale

Low because date schema absence and inconsistencies degrade freshness signals and SERP date display without causing indexing failure or functional breakage.

## Remediation

Source date fields from the same frontmatter or database record that populates the UI — never hardcode them separately in schema. In `app/blog/[slug]/page.tsx`, generate the BlogPosting schema from the post's metadata:

```tsx
export default function BlogPost({ post }: { post: Post }) {
  const schema = {
    '@context': 'https://schema.org',
    '@type': 'BlogPosting',
    headline: post.title,
    datePublished: post.publishedAt, // '2024-01-15T10:00:00Z'
    dateModified: post.updatedAt ?? post.publishedAt,
    author: { '@type': 'Person', name: post.author },
  }
  return (
    <script
      type="application/ld+json"
      dangerouslySetInnerHTML={{ __html: JSON.stringify(schema) }}
    />
  )
}
```

Both dates must be ISO 8601 with timezone (`Z` or offset). Add a CI assertion that `dateModified >= datePublished` to catch data pipeline errors before they reach production.

## Detection

- **ID:** `content-dating`
- **Severity:** `low`
- **What to look for:** Count all blog post and article pages. For each, check the JSON-LD schema or page metadata for `datePublished` and `dateModified` fields. Verify dates are in ISO 8601 format and that `dateModified` is not earlier than `datePublished`. Enumerate which posts have both fields, which have only `datePublished`, and which have neither.
- **Pass criteria:** At least 90% of blog posts include `datePublished` in ISO 8601 format, and at least 50% of posts updated after initial publication include `dateModified`. Dates are chronologically consistent (`dateModified` >= `datePublished`). Report: "X of Y blog posts have datePublished; Z of W updated posts have dateModified."
- **Fail criteria:** Fewer than 90% of blog posts have `datePublished`, or dates are not in ISO 8601 format, or `dateModified` is earlier than `datePublished`.
- **Skip (N/A) when:** Project has no blog or article pages.
- **Detail on fail:** `"3 of 10 blog posts lack datePublished in schema"` or `"dateModified on /blog/post-5 is 2023-01-01, earlier than datePublished 2024-06-15"`.
- **Remediation:** Add date schema to blog post components in `app/blog/[slug]/page.tsx`:

  ```tsx
  export const metadata = {
    other: {
      'ld+json': JSON.stringify({
        '@context': 'https://schema.org',
        '@type': 'BlogPosting',
        datePublished: '2024-01-15T10:00:00Z',
        dateModified: '2024-02-20T15:30:00Z',
      }),
    },
  }
  ```

## External references

- schema-org BlogPosting

Taxons: findability

HTML version: https://auditbuffet.com/patterns/ab-002505
