Instead of allowing a generic error page to be shown when a visitor has a problem on your website, you can create custom error pages.
These can be more user friendly than the normal pages, and you can try offering your visitors different ways to recover from whatever error they may have encountered.
The pages listed below are the most common ones that will need to be dealt with, but you can create custom pages for many other errors.
Each line must start with ErrorDocument, followed by the code for the error you want to provide a page for, finished with the address of the custom page.
ErrorDocument 401 /errors/unauthorized.php
ErrorDocument 403 /errors/forbidden.php
ErrorDocument 404 /errors/notfound.php
ErrorDocument 408 /errors/timeout.php
ErrorDocument 500 /errors/internalerror.php