How to Make Redirect 404 Page to Homepage in WordPress? 404 page is a part of our website. Every website has this 404-page error. But, many bloggers ignore to setting 404 page whereas it is quite essential if you want to make more engagement with your visitors.
Please look at the screenshot below. What do you feel when you search something on any website, and you found this page?
Fell annoying right? Very ugly page. And you will close this site immediately.
So, that is the feeling of your visitor when they visit your site, and they get this error.
To prevent this, follow my tutorial below.
Make Redirect 404 Page to Homepage in WordPress
So, firstly what you must to do?
Step 1: Log into your cPanel
Step 2: Navigate to your installation wordpress theme. It looks like something likes this: public_html/minutesguide.com/wp-content/themes/choose-your-theme
Step 3: Now open your current theme. Then, make sure there are 404.php in your theme file. If it does not exist, then create a blank PHP file named 404.php.
Step 4: When you have done create 404.php, copy the code below and put on it.
Click save and that all.
Now, please test your site with any wrong URL. You will look how the magic of your 404 error will bring you directly to the homepage.
In this tutorial, you have learned how to make redirect 404 page to the homepage on your WordPress site. It is a straightforward tutorial you should follow. Remember, 404 is a compulsory part of our website, and it is quite important you have to set.
If you like this article, then please FOLLOW our Linkedin, Twitter, YouTube, Pinterest, and Facebook. Do not forget to check our services page to upgrade your WordPress. If you find this post has an issue with copyright, outdated, or in error, please contact us to fix it.