2.12.8. Customizing the delivery of your 404 error page
ErrorDocument 404 /404.html
After that, create a file in the root directory of the site
404.html and write in it the code of the page that will be shown in case of 404 errors.
Similar settings can be made for errors 401, 403.
To customize your 404 error page in popular CMS corresponding instructions are available: