This is often overlooked when moving or updating a website. Most Hosts will provide a default 404 error page but these are generic and not very helpful to your customer.
No matter how hard you try you will always find the odd broken link or missing document. This is a basic and simple way to give your customer a better more useful page on this error.
It will give your customer a contact page to let you know what’s missing or how you can help.
This is based on shop being installed in root directory. and on Edge but should work for any version
First open your .htaccess file in the root directory and add this line to it.
“ErrorDocument 404 https://www.mywebsite.com/404contact_us.php”
****replace https://www.mywebsite.com with your own website****
Now make a copy of contact_us.php in the root directory and name it 404contact_us.php
Now open 404contact_us.php and find this line. It should be around line 37 in Edge.
<h1 class="h3"><?php echo HEADING_TITLE; ?></h1>
Replace this with,
<h1 class="h3"><?php echo "Sorry but we could not find that! Please contact us and we will try and help."; ?></h1>
Now save and close the 404contact_us.php file.
That’s it. Now when someone finds a broken link instead of getting a generic 404 error page like this.
They are redirected to your website 404 contact _us page. Its only a little thing but it all helps.