How to Redirect your 404 page to the Home Page in WordPress?

Go to the root of your template, check if there is 404.php or not. If you can not find this file, just create one, then edit  404.php, add the following code:

<?php
header(“HTTP/1.1 301 Moved Permanently”);
header(“Location: “.get_bloginfo(‘url’));
exit();
?>

Done! Simple ? Yes!

I have tested the code for www.glassescare.com