Redirect users from 404 page in WordPress: Well, I am sure you are facing a 404-page error in your WordPress website and want to redirect users from 404 page in WordPress to your homepage or any customize page. Then this guide is definitely going to help you.
I know how tiring it can be to deal with 404 redirects. So to help you deal with this issue we have this nice guide which will try to solve all your problems related to 404-page errors.
How to redirect users from 404 page in WordPress:
There can be two ways through which you can redirect users from 404 page in WordPress, let’s see both of them.
METHOD 1: MANUALLY CREATE A 404-PAGE
In this method, you can manually create your 404 redirect page and whenever a user is encountered with 404 page they will be redirected to the Homepage of your blog/website. So it’s basically a win-win situation for everybody.
Let’s see how to create a 404 redirect page:
1.Login to your WordPress admin account from your website URL example: www.abc.com/wp-admin/ should be the default format.
2.Now from Appearance go to Editor.
3.This will open your theme editor where you to create the 404 redirect page file.
4.Now it’s possible that there should already be a file by name 404.php in which case you don’t have to create a new one.
5.But if you don’t have the file then you to create one for which you have to login int your Cpanel, then go to File manager, then locate your public_html folder.
6.Now from there go to wp-content then themes, now browse your current theme folder and create a new file with name 404.php and go to the next step.
7.Now when you are inside the editor or you have created a new file just put the below code in your file and make sure you file doesn’t contain anything else other than this code:
<?php header("HTTP/1.1 301 Moved Permanently"); header("Location: ".get_bloginfo('url')); exit(); ?>
METHOD 2: INSTALL A 404 REDIRECT PLUGIN
This is the easiest way you could redirect users from a 404 page in WordPress to anywhere you want on your blog/website. There are ample of plugins presents to help you with this but I am going to only talk about the best ones:
This one plugin can do anything that is related to redirection. Its simple yet powerful and that too totally free with a whopping 600,000+ Active install its one of the best plugins to be present till date.
This plugin is very useful if you are migrating from your hosting account or your are changing WordPress directories.
- Automatically add a 301 redirection when a post’s URL changes
- Manually add 301, 302, and 307 redirections for a WordPress post, or for any other file
- Full regular expression support
- Apache .htaccess is not required – works entirely inside WordPress
- Redirect index.php, index.html, and index.htm access
- Redirection statistics telling you how many times a redirection has occurred, when it last happened, who tried to do it, and where they found your URL
- Fully localized
And what’s more this plugin is available in most of the language, so now you now why it’s called one of the best plugins. Go here to download the plugin or you can also install it from within the WordPress.
If you are not happy with the above redirection plugin because the above plugin is taking its toll on your database then don’t worry this 404 Redirect plugin is especially for you. It’s a very simple and doesn’t have an advanced feature like the above plugin but it totally does its job.
With an active install of 90,000+ its the second best plugin after Redirection. This plugin lets you redirects your 404 page to home page or any other customize page.
That’s all you are going to learn about How to Redirect users from 404 page in WordPress. If you still have a question regarding this post feel free to ask them in comments.
You can also share this post on your social network in order to help your family and friends struggling with redirects problems.
Latest posts by adityafarrad (see all)
- Fix Boot Configuration Data File is missing some required information - April 13, 2017
- Fix Your PC needs to be repaired error - March 28, 2017
- Fix Windows Store Error The Server Stumbled - March 27, 2017