Dev Helpers
← Back

Search missing content

Place this file at app/not-found.tsx in an App Router project.

Open this example in the interactive library

Source code

// app/not-found.tsx

import Form from "next/form";

export default function SearchMissingContent() {
  return (
    <main>
      <h1>Page not found</h1>
      <Form action="/search">
        <label>
          Find a page
          <input name="q" required />
        </label>
        <button>Search</button>
      </Form>
    </main>
  );
}