An 404 page does not give the correct HTTP status code

Steps to reproduce

When visiting a page that doesn’t exist anymore (for example: 404page - Vreeman.xyz Knowledge Base) the HTTP Status code should reflect that with the code 404 (List of HTTP status codes - Wikipedia).

Instead, the status code is still a 200, which means that everything is OK.

Checking the HTTP status codes can be done with https://httpstatus.io/

Expected result

A page that does not exist should give a 404 status and not a 200. By using HTTP status codes correctly also bots (eg Google, Bing, Duckduckgo) will better understand the website. Which has a positive effect on SEO.

1 Like