Basics · Next.js (App Router)
My 404 page returns a 200 status in Next.js (App Router)
The fix for Next.js (App Router)
13x detects your framework from the response and hands you this version rather than the generic one — below 50% confidence it hedges and gives you the generic one instead.
Add app/not-found.tsx — Next serves it with a 404 status automatically:
export default function NotFound() {
return <main><h1>Page not found</h1></main>;
}For dynamic routes, call notFound() when the record is missing rather than rendering an empty state:
import { notFound } from "next/navigation";
const post = await getPost(slug);
if (!post) notFound();A catch-all route that renders a "not found" message without calling notFound() returns 200, which is the usual cause.
On a different stack? The general version of this fix explains what 13x checks and why it matters, without assuming a framework.
Check your Next.js (App Router) site
113 deterministic checks against your live URL, in about 30 seconds. Framework detected from the response, so every fix comes back in the form your stack actually uses.
No signup. Results in 30 seconds.