To create a custom 404 page you must first create a .htaccess file in your public web folder.
Create a .htaccess file in your public web folder.
Then place this in the .htaccess file – this is the only line of code to be placed in it
ErrorDocument 404 http://yourdomain.com/file.html
Then the error 404 would go to the page file.html – similarly for creating a custom 403 error page you would do the same thing.
ErrorDocument 403 http://yourdomain.com/file.html