Dev Helpers

Next.js / Metadata pages

Draft preview indexing

Dev Helpers · November 19, 2026

Draft pages need deliberate indexing metadata. An indexing directive controls crawler intent, while access to unpublished material needs a separate permission check.

Worked example

// app/workshop/page.tsx

import type { Metadata } from "next";

export const metadata: Metadata = {
  title: "Draft preview",
  robots: { index: false, follow: false },
};

export default function DraftPreviewIndexing() {
  return (
    <main>
      <h1>Draft preview</h1>
      <p>Editorial work in progress.</p>
    </main>
  );
}

Implementation notes

Private previews should retain server-side access checks even when excluded from search indexes. A copied URL can still be visited directly.

Try it yourself

Inspect the rendered head and then test access in a signed-out browser.

Open the Next.js example →

Editorial date November 19, 2026 · Published December 6, 2026

Related articles

Free bin volume

Free storage volume depends on consistent dimensions and units. Derive capacity and usage in the same unit before formatting a human-readable summary.

Party size allocation

Allocating a party into groups is an integer problem. The remainder determines whether another group is needed and how full it will be.

Locale preserving contact link

Localized links should retain the active language segment. Validate supported locales before inserting user-controlled segments into a destination.