I have a custom 404.html file in the root of my web app along with the netlify.toml file that looks like this:
from = "/*"
to = "404.html"
status = 404
However, I still get the default Netlify 404 error page when attempting to go to a page that doesn’t exist. This is just a vanilla js portfolio site, so no routing or frameworks. The only odd thing I’ve noticed, is that if I try to go to mysite/404.html it does not work there either and returns an actual 404.
Thanks for reaching out and welcome to Netlify’s Support Forums!
Could you clarify which site you’re having this issue on? If you could provide the site name (such as
sitename.netlify.app) so we can investigate the issue.
Thanks for the follow-up. It doesn’t appear that the
404.html file has been included. Could you check here: Netlify App at the bottom of the logs is a Deploy file browser tool that’ll allow you to see if the file (
404.html) has been included in the deploy.