New visitors can turn away from your website and never return if they see the “page not found” message on your site. This occurs when a visitor clicks on a broken or expired link. We can help website owners set a custom 404 page that’ll inform the visitors about the issue and prompt them to visit the working part of your website.
Creating a custom 404 page on WordPress by installing a plugin
Installing a 404 page via .htaccess file in HTML