@mabelle
In order to serve an HTTP header 404 with a static HTML page, you can follow these steps:
- Create the HTML page that you want to be displayed when a 404 error occurs. Save it as a regular HTML file, such as "404.html".
- In the root directory of your website, create or edit the .htaccess file. If you don't have a .htaccess file, create a new file and name it ".htaccess" (note the leading dot in the filename).
- Inside the .htaccess file, add the following line of code:
ErrorDocument 404 /404.html
This line sets the custom page (404.html) to be displayed when a 404 error occurs.
- Save the .htaccess file and upload it to your website's root directory.
Now, when a user tries to access a non-existent page on your website, the server will respond with a 404 status code and display the custom HTML page you created.