I have two files in the public folder.
one called 404.stml
one called 404image.jpg
The contents of the .shtml is
Rename the 404 with a .shtml extention and if you want also an image that you name the same as the jpg above and upload them to your public folder. You can then go to yourfoum.com/404.shtml and see if it works. If that works great, all you need to do then is play about with the shtml file to get what you want