Are you looking for an easy way to find 404 error pages on your WordPress website and redirect them?
404 errors occur when users try to reach a page on your website that no longer exists. These 404 errors create a bad user experience which can lead to a drop in search engine rankings and lower eCommerce sales.
In this article, we will show you how to easily track 404 pages and redirect them in WordPress.
What is a 404 Error?
A 404 error is an HTTP status code, which shows that the server couldn’t reach the web page you are trying to visit.
This means that if you enter a URL of a web page that does not exist, then you’ll see a 404 page not found error.
Now, there are many reasons why 404 error occurs. It could be because you made a mistake when entering the URL address, the page was deleted from the website, or the domain name no longer exists anymore.
Another reason that may cause a 404 error is that the page was moved to another URL but wasn’t properly redirected, resulting in a broken link.
Last but not least, sometimes server malfunctions can also lead to 404 errors in a WordPress website.
Why Track 404 Pages and Redirect Them?
Now that you know the different reasons that could cause 404 errors, let’s take a look at why it’s extremely important for website owners to track 404 errors and fix them.
404 errors are bad for your site’s user experience. If users can’t find the page they are looking for, then they will likely leave your site and go to your competitors.
This means you’ll lose potential customers and miss an opportunity to convert your visitors into subscribers.
Aside from that, 404 errors have a negative impact on your WordPress SEO rankings. Search engine ranking algorithm often penalize websites when they run into broken links.
Not to mention, these broken pages will cause you to lose valuable backlinks for your website which results in lower domain authority and significant drop in Google keyword rankings.
With that said, let’s take a look at how you can easily track 404 pages and redirect them in WordPress. We will cover two different methods, so feel free to click the link below to jump ahead to your preferred method:
- Track WordPress 404 Pages and Redirect Them Using AIOSEO (Recommended)
- Track WordPress 404 Pages and Redirect Them Using Redirection Plugin
Method 1: How to Track 404 Pages and Redirect Them in WordPress Using AIOSEO
The easiest way to track and fix 404 pages on your WordPress website is by using the All in One SEO plugin for WordPress also known as AIOSEO. It’s the best SEO WordPress plugin that is used by over 2 million professionals.
AIOSEO allows you to easily find pages with broken links and fix them with just a few clicks using their powerful redirection manager.
The best part about AIOSEO is that it helps you setup faster 301 redirects which helps you improve search engine rankings.
For this tutorial, we will be using the AIOSEO Pro version because it includes the powerful redirection manager addon. There is a free version of AIOSEO, but it doesn’t include 404 monitoring and redirection manager.
First, you will need to install and activate the AIOSEO Pro plugin. For more details, please see our step-by-step guide on how to install a WordPress plugin.
Once the plugin is active, go to All in One SEO » Redirects and click the ‘Activate Redirects’ button.
After that, you need to visit the ‘Settings’ tab under Redirects to enable 404 logs and track pages with broken links.
Simply scroll down to the ‘Logs’ sections and make sure that the ‘404 Logs’ option is enabled. Next, select the time period to record the 404 logs using the drop-down menu. We recommend no longer than one month for optimal server performance.
Once you are done, go ahead and click the ‘Save Changes’ button.
Now, you will see a ‘404 Logs’ tab in the Redirects section in AIOSEO.
When you first enable 404 logs, this page will not have any data. It only starts monitoring 404 pages after you enable the setting.
Once activated though, AIOSEO 404 logging actively monitors for 404 errors on your website and will display them here.
It will show a list of all the URLs that have a 404 error, how many times the link was visited under the ‘Hits’ column, and the date when it was last visited under the ‘Last Accessed’ column.
Once you have identified the pages with broken links, you can simply redirect them by clicking the ‘Add Redirect’ button.
When you click the button, you’ll see the option to enter a target URL and select the redirection type from the drop-down menu. For example, you can move a page permanently by selecting the 301 Moved Permanently option.
After that, click the ‘Add Redirect’ button and your broken link will now automatically redirect to the new target URL.
Note: With time, the size of your log file can grow and take up a lot of disk space. The lack of WordPress hosting disk space can lead to errors.
To make sure that you don’t run into this problem, it’s a best practice to delete and clear 404 error logs.
With AIOSEO, you can easily delete any individual 404 error from your logs by clicking the trash can icon.
You can also bulk delete your 404 logs by going to All in One SEO » Tools and then click on the ‘Database Tools’ tab.
Now scroll down to the ‘Logs’ section and click the ‘Clear 404 Logs’ button.
Aside from tracking 404 errors, AIOSEO redirect manager also comes with permalink monitoring. This means if you delete a page on your site, or change the URL of any blog post, then it will automatically notify you to setup a redirect.
In some cases, AIOSEO can even setup the proper 301 redirects for you without any effort.
Bonus Tip: Setting up faster 301 redirects in WordPress with AIOSEO
AIOSEO allows you to setup faster redirects by going to the Settings tab and choosing the Web Server redirect method.
This allows you unlock significant speed improvements when compared to the default WordPress / PHP redirect method.
Method 2: How to Track 404 Pages and Redirect Them in WordPress Using Redirection Plugin
The next method to keep track of 404 pages and redirect them is by using the Redirection Plugin for WordPress.
Note: This is an advanced plugin and some beginners may find it harder to use.
First you need to install and activate the plugin. For more details, please see our step-by-step guide on how to install a WordPress plugin.
Upon activation, go to Tools » Redirection and then scroll down to click the ‘Start Setup’ button to set up your redirects.
After that, the plugin will ask whether you would like to monitor permalink changes in WordPress and do you want to keep logs of redirects and 404 errors.
Just select the checkbox for these options and click the ‘Continue Setup’ button.
The plugin will now test the Rest API status. When the status result comes back as Good, you can click the ‘Finish Setup’ button.
After that, you can add a new redirection for your 404 pages. To start, enter the URL of the page you want to redirect in the Source URL column.
Next, select whether you’d like to exactly match the query parameter, ignore them, or pass them through to the target URL from the Query Parameter drop-down menu.
Now enter the Target URL to which the 404 page will be redirected, keep the Group option to ‘Redirection,’ and click the ‘Add Redirect’ button.
If you want more options to set up redirection, then click the ‘gear icon’ next to the Add Redirect button.
You can begin by adding the old URL showing 404 in the Source URL column, selecting the Query Parameter like before, and adding a Title to describe the purpose of this redirect.
After that, select the Match option from the drop-down. You will see multiple options, including URL only, URL and referrer, URL and user agent, and URL and login status.
In most cases, you want to use URL and referrer. Mainly because if you see several 404 requests for a specific page, then it’s likely not a user typo error, but rather it has to be someone who is linking to the wrong URL.
Now, whenever someone else links to the broken URL or a post that you moved, it will automatically redirect them to the new location.
Next, make sure that your action is ‘Redirect to URL’. The other options are complex and require advanced technical knowledge.
In the redirection type, you need to select an option from the HTTP code drop-down (like 301 – Moved Permanently).
Lastly, enter the target URL in the Matched Target column. After you have entered this information, hit the ‘Add Redirect’ button.
You can go to the new URL to test and make sure that the redirection is working properly.
The plugin also has the option to track 404 error logs. Simply click on the ‘404s’ tab at the top, and the plugin will show you recent 404 errors that occurred on your site since you installed the plugin.
Note: if you just enabled the Redirection plugin, the 404 log page will be empty. It only starts keeping a log of 404 errors after the plugin is activated.
We hope this article helped you learn how to track 404 pages and redirect them in WordPress. You may also want to take a look at our guide on best WordPress contact form plugins to allow users to notify you when they see a 404 error, and our comparison of the best business phone services for remote teams.