For webmasters one of the major disadvantages of the 404 errors is that they reduce the credibility of your site. Can you imagine a situation where you visit a site trying to get some important information, only to get the 404 error? Chances are that you would leave the site and not come back again, leading to a high bounce rate for the site. Site owners should, therefore, avoid this as much as they can. WordPress comes with many plugins for handling 404 errors. In this tutorial we will discuss a plugin called 404 to 301. This is a simple plugin that redirects all 404 error pages to a working URL. This is very important for improving your site ranking on search engines, keeping the power that your old pages had on new pages and in avoiding duplicate content.
What is a 301 and 302 status?
A redirect is the process in which search engines and site visitors are taken to another page in place of the one they were originally visiting. The most common types include the “301” and “302” redirects. A 301 redirect is the best method one can use to implement redirects on their website. It is permanent (meaning that the page permanently moved) and passes up to 99% of ranking power to redirected pages. A 302 redirect is not permanent. It requires search engines to make a decision on replacing the old page with a new one or keeping it. The reasons we are choosing the 404 to 301 plugin over the others are:
It is free and easy to install and useIt allows a site owner to work on the links with errorsLogged error notifications are sent to the administrator’s email address
Note: for this plugin to work, you need to enable rewrite_module in your Apache server.
Installation
To install the plugin, follow these steps:
- Log in to the admin panel of your WordPress installation, then click on “Plugins” and the “Add New” button.
- In the search bar type “404 to 301” and press Enter. Make sure that you have an Internet connection if you are using a local installation of WordPress.
- Click on the “Install Now” button as shown in the image below, then activate the plugin.
Configuration
After successfully installing and activating the plugin, the next step is the configuration or the settings.
- On the Dashboard click on the “404 to 301 -> 4040 Settings” link on the side menu.
- By default, we have the “301 Redirect” selected. Leave it selected.
- Select the page you would like the site visitors to be redirected to. If you do not have one, you can simply create a page and select it.
- One of the advantages of this plugin is that we can log errors. Select “Enable Error Logs” here to get the logs. Make sure to fix the errors as logging can be resource intensive and could slow your site down.
- To get notifications for the logged errors, tick the “Email Notifications” checkbox and type in your email below it.
- The final step is to add paths that you would want excluded from the error logs. After saving the settings you can try to visit a page that is not available on your site. Instead of this generating a 404 error or the page not found error, you will be redirected to the new page that you have set up. In my case I created a page, shown below.
Conclusion
As a site owner, developer or designer, you would definitely want to have a good ranking on search engines. To do that, it’s important to provide a good user experience through managing your 404 errors. The 404 to 301 plugin enables us to do that in a simple way, meaning we do not need to use coding to manage the errors. This ends up ensuring that the site has a better ranking on search engines.