New: Cookbooks and AI ExplanationsStep-by-Step recipes to solve problems connected to Roadmaps and Cheat Sheets. Need more details? Use AI buttons for structured and simple explanations with concrete examples throughout the whole platform.Take a look
A deleted product's URL still loads. It just loads empty.
What you'll have at the end
A route that calls notFound() and renders not-found.tsx with a genuine 404 status, checked in the browser's network tab
You need
A dynamic route that already looks up one real record by its own id and renders it when found, but currently returns nothing once the lookup comes back empty.
Not covered
Redirecting a page that has genuinely moved to a new address, or designing what the not-found message itself should say; this only covers making the response's own status match what the screen already shows.
Leans on
Checked 25 Aug 2026
Part of the NextJS cookbook