Search code examples
http-status-code-404

How do you make a 404 page?


I thought of making a 404 Page. but it seems hard.. how do i do it?

Here's what I did:

  1. Made .htaccess File
  2. Put: ErrorDocument 404 /page-not-found.html inside of the .htaccess file..
  3. Added css design

Why doesn't it work?

I use glitch as my coding website. Is that the problem? Is there an alternative way to do this.?


Solution

  • If you want a custom 404 page for an app on Glitch, you'll need to be building a Node/full-stack app and configuring the page in your server-side code.

    For example, I've got this simple Express app that sends any non-index route request to a 404 page: https://glitch.com/edit/#!/tranquil-hurricane-friction?path=server.js%3A25%3A0