Custom 404 page returns invalid 404 OK
status in server mode
#13259
Labels
needs triage
Issue needs to be triaged
404 OK
status in server mode
#13259
Astro Info
If this issue only occurs in one browser, which browser is a problem?
No response
Describe the Bug
When using server-side rendering (SSR) with a custom
src/pages/404.astro
page, the server responds with a404 OK
status code.This issue occurs in both development and production environments.
The issue can be resolved by explicitly setting the response status in the 404 page:
Note: The default 404 page provided by Astro behaves correctly.
What's the expected result?
The server should respond with a
404 Not Found
status code when serving the custom 404 page.Link to Minimal Reproducible Example
https://stackblitz.com/edit/github-28wvkirt?file=src%2Fpages%2F404.astro
Participation
The text was updated successfully, but these errors were encountered: