Fix a 404 page that returns 200 (soft 404)
Open a made-up address on your app, like yourapp.com/not-a-real-page. If your home page appears, or a "not found" screen loads but the server still answers 200, you have a soft 404.
Why it matters
Every web response carries a status code. 404 means "this page does not exist" and 200 means "here it is". If missing pages answer 200, search engines can treat junk addresses as real pages and waste time on them, and tools cannot tell a broken link from a working one. Google lists soft 404s as a problem in Search Console.
How to check in 30 seconds
- Open the developer tools (F12) and go to the Network tab.
- Visit
yourapp.com/this-page-should-not-exist. - Click the first request and read the Status. You want 404.
Why AI-built apps often have it
Single-page apps handle addresses in the browser, so the host is told to send every address to the same index.html. That setting is correct for deep links, but it also makes unknown addresses answer 200.
How to fix it
If your app has a server
Express
app.use((req, res) => {
res.status(404).sendFile("404.html", { root: "public" });
});If you use Next.js
Unknown routes return 404 by default. Call notFound() in a page or route when a record does not exist, so that address returns 404 too.
If it is a static site or single-page app
- Netlify: add a
404.htmlto your publish folder and remove any catch-all rewrite to/index.htmlif you do not need it. - Cloudflare Pages: without a top-level
404.html, Pages treats your project as a single-page app and servesindex.htmlwith 200 for every unknown address. Adding a404.htmlchanges that. - Vercel: unknown routes return 404 unless a rewrite sends them elsewhere. Check your
vercel.jsonfor a catch-all.
If your app depends on client-side routes, removing the catch-all can break deep links. Test a few after you change it.
At the very least, make the not-found screen say the page is missing, give a link home, and add <meta name="robots" content="noindex"> to it.
Want this checked on your app?
In the complete check, App Investigators opens made-up addresses and reports when the response does not say the page is missing.
We email you once when a spot opens. No spam, and you can ask us to remove you any time at support@appinvestigators.com.
Related guides
- Pre-launch checklist for an AI-built app
- How to test a vibe-coded app before you launch
- Security headers for AI-built apps: what to add and how
Last updated 2026-11-24. This guide describes common problems and fixes. It is not a guarantee that any app is secure or free of bugs.