Social Media Marketing
SEO Basics & Ranking
Guest Posting Sites
Submit Your Blog
₹ Reward Program
Keyword Volume Checker
Search Result Keywords
Question Keyword Suggestions
Marketing Keyword Suggestions
A-Z Keyword Suggestions
Alexa Rank Checker
Guides & Reviews
Aug 29, 2021
How to Redirect 404 Error Not Found Page to Home Page in WordPress
Leave a Reply
To leave a comment, please
1: How to Redirect 404 Page to Home Page Using Code
You can redirect all 404 pages to homepage by using custom code in your site. Simply, you need to add the code to your WordPress file.
First, you need to create a new file in your WordPress theme folder and name it 404.php. If your theme already has a 404.php file, you'll need to edit the file.
And then you need to add the following code to your 404.php file:
header("HTTP/1.1 301 Moved Permanently");
After this save your 404.php file. Now, when a visitor visits the 404 page of your site, he/she will be redirected to the home page.
2: How to Redirect 404 Page to Home Page Using Plugin
If you are afraid of adding code to your site, you can use a plugin.
First of all install and activate Redirection plugin on your site. After activating the plugin, click on Tools >> Redirection and follow the below screenshot.
Here you add your 404 Error Page in the Source URL field and add the Home Page URL in the Target URL field. After that leave the rest of the settings as default.
After adding your URL click on “Add redirect”. Now to test it, you can click on the URL with 404 not found.
23 days ago
How to Enable Text Selection and Copy/Paste in WordPress
How to disable directory browsing in WordPress
What is WordPress jobs website
How does a DDoS attack work?
Why Missed Scheduled Posts Error Occurs?
What is a Loop in WordPress?
7 Best WordPress Plugins for Every Website [Paid & free] (2021)
What is XML and its uses?