NextJS hosting on Firebase: how to respond with status 404 on a custom 404 page

Viewed 165

Any idea how to make a custom 404.js also return an error code 404 rather than 200? Hosting is on Firebase hosting so no access to .htaccess or Apache or anything like that.

The trouble is Firebase hosting only allows to rewrite source ** to an html file like /404/index.html which by default returns 200 rather than 404, which is a bad SEO experience.

So the question becomes if Firebase and/or Nextjs has any way for an html file to return a status 404? tried httpEquiv, didn't work, still 200...

0 Answers
Related