Solution 1 :

The netlify.toml file is how Netlify handles file-based configuration, which lets you configure more advanced options for your deploys, as well as override options which you can otherwise set in the web-based frontend. If your repository doesn’t already have this file, you can create it at the root of your repository and Netlify will read it automatically on the next deploy.

While you can’t set up redirect rules from the frontend, you don’t necessarily need to create a netlify.toml file to use a custom 404 error page, though doing so gives you more advanced control. You can also create a _redirects file in the publish directory (ie: the directory that actually gets published by Netlify) with the original destination (including a splat * that matches anything after it, if desired), the redirected destination and an HTTP status code.

# Put this in _redirects in your publish directory
# This shows a custom 404 page for any paths on the site
/* /404.html 404

Problem :

So I have a couple of files in a GitHub repository, and I want to set up a custom 404 Error page. When I searched it up, It asked me to insert something in my netlify.toml file, which was supposed to be in my root directory(I think that means the repository itself), but I cannot find it! Am I supposed to create the file in my repository? Any help would be greatly appreciated.


Comment posted by 1

So do I need to create the _redirect file with any extension? And I don’t have any publish directory, so what should I do? Should I create a directory? Or should I just create the _redirect file in my root directory?

Comment posted by Hoppeduppeanut

Nope, no extension, just name it

Comment posted by this forum post

After a quick dig-around, according to