In a client-side single-page app, using meaningful HTTP status codes can be impossible or impractical, so Googlebot queues pages with a 200 HTTP status code for rendering instead of seeing a 404. Here's the fix: use meaningful HTTP status codes like 404 where you can, tell Google not to index the page with a robots meta tag or header, or output when serving crawlers through Prerender.io.
The catch is how client-side routing works. Some JavaScript sites use the app shell model, where the initial HTML does not contain the actual content. Google has to execute JavaScript before it can see the actual page content that JavaScript generates, and using meaningful HTTP status codes can be impossible or impractical.
Google processes JavaScript web apps in three main phases: crawling, rendering, and indexing.…