Menu

Our 404 page answers 200, and we decided to keep it that way
📰

Our 404 page answers 200, and we decided to keep it that way

DEV Community: react·Emmanuel·5 days ago
#QwlY9oyN
#devtoreact#devto#dev#exam#status
Reading 0:00
15s threshold

I run a site with practice exams for Dutch certification exams. Each exam has a few fixed practice forms, at URLs like /examen/b-vca/1/ , /examen/b-vca/2/ and so on. Last month I typed /examen/b-vca/999/ to check the error page.

The page looked right: "Deze pagina bestaat niet" ("this page doesn't exist"), the normal layout, a link back. Then I looked at the status code. 200.

A 404 page served with a 200 is what Google calls a soft 404. Here's why it happens in Next.js 16 with partial prerendering, what I tried, and why I ended up leaving it.

Why the status is already gone

The exam page is built the way Next.js 16 wants you to build it with cacheComponents: true .…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.