Things get lost, deleted, links point to the wrong location. These things happen. When they do it is best for the user experience to create a useful 404 Not Found page. This is called a soft 404 page.
Creating a soft 404 page is very simple. First, create a page that will function as the 404 page. Then add the following code to your .htaccess file.
ErrorDocument 404 /error/custom404.php
You should change
/error/custom404.php to the location of your 404 page.
You can set soft error pages for more than just 404 errors.
ErrorDocument 401 /error/custom401.php ErrorDocument 403 /error/custom403.php ErrorDocument 404 /error/custom404.php ErrorDocument 500 /error/custom500.php ErrorDocument 502 /error/custom502.php ErrorDocument 503 /error/custom503.php ErrorDocument 504 /error/custom504.php
You should note that if you have a 5XX Server Error your nice soft error page may not be able to be served. However, you can create them if you want.