How to get 404 status code response for React.js & Firebase (GCP) Hosting app

Viewed 16

I recently took on a new client who had an existing web presence with their domain, and the old build structure of the links, Google is still indexing those sub-title links on the search result for the company as the old links. I have re-submitted the sitemap on Google Search console, tried re-indexing them individually, and also tried submitting removal requests for domains with certain suffixes. None of this has changed the links Google is bringing up in search, still the old links. The proper links are scattered in there, but not the top results.

enter image description here

I asked to the Google Search forum and we found that the pages are still returning a 200 status code, and not a true 404 status code when the page does not exist on the site (see below). My app is built with React.js and hosted with Firebase Hosting on Google Cloud Platform. I am not seeing a lot of information online on how to fix this issue I am having so my Error Boundary in React is sending a true 404 error. Or if client side status code sending is not possible, then doing so on the Firebase side. Any ideas out there on how to fix the primary issue of Google promoting dead links under main link for a website?

enter image description here

0 Answers
Related