In our last tutorial, we discussed how you could monitor your website’s 404 errors using Rank Math. In this tutorial, we are going to learn how to fix them.
As you know, all the captured 404 errors are visible in Rank Math’s 404 Monitor. Before learning to fix 404 errors on your website, be sure that you’ve enabled the 404 Monitor module by navigating to WordPress Dashboard > Rank Math > Dashboard > Modules.
Start by going to the 404 Monitor using the WordPress menu.
Depending on your website, you would see some errors or a blank slate. Here is how our 404 Monitor looks like.
If you remember, this is how the Advanced 404 Monitor looks like. If we switch to the Simple 404 Monitor, the screen turns into something like this.
The data is the same, but with a few differences. Regardless of the type of 404 Monitor you use, you will be able to resolve the 404 errors on your website.
Table of Contents
1 How to Think About Resolving 404 Errors
Before getting into the specifics of solving the 404 errors, you have to understand how to think about solving these errors. Creating a mental framework for decision-making regarding 404 errors will help you develop a cohesive strategy for dealing with these errors, which you can also extend to your staff.
Broadly speaking, there are only 3 ways to resolve a 404 error.
- Fix the source of the problem
- Redirect the problematic URL
- Ignore the problem
Based on the problem, you will need to decide which solution is the best for each of the errors and then implement it. Let us discuss each of the solutions and the potential reasons for choosing one over the other.
1.1 Fix the Source of the Problem
The first solution that you should try to implement is to fix the problem at its source. For finding the source, you have to think about how your visitors are finding you.
Your visitors can be classified into 2 categories. Direct visitors, and referrals. Direct visitors access your website directly by typing in or pasting in the URL, and the referral visitors can come from other websites, social networks, or even search engines. To see those referrals, you’ll need to use the Advanced 404 Monitor in Rank Math.
If direct visitors are typing in the wrong URL in their browser, there is little you can do to solve that problem. It is best to move to the next solution.
If the 404s are caused by referrals, then there can be 2 possibilities.
- Internal Referrals
- External Referrals
Internal Referrals are easy to fix, just go to the referring post, find the link, and fix it. All done.
For external websites, you can’t go out and change the link yourselves, but you can definitely contact the website owner and ask them to fix it. It is also a great opportunity to build some relationships with other website owners in the industry.
If the website owner does not respond, you can always use the second solution.
1.2 Redirecting the Problematic URL
Redirection is the method by which you make any of your URLs point to another URL. It is like saying to the browser, “I see you’re trying to access URL 1, but it’s not available, please go to URL 2 instead”.
When you’re unable to fix the broken link problem yourself, then redirection is the way to go. For this reason, many times, redirection is the preferred way of solving 404 errors, as it gives you the most control. When you’re redirecting your URLs, you don’t have to worry about other website owners replying to your emails and fixing their links. You don’t even need to know the referrer of your broken links. You can fix them all instantly.
1.3 Ignoring the Error
Yes, we did tell you the importance of fixing 404 errors, and now we’re talking about ignoring them. But, there is a difference.
We are not asking you to ignore all 404 errors, only some 404 errors. The key is knowing which ones to ignore.
When you fix 404 errors for some time, you’ll develop a sense of which errors seem like genuine errors, and which don’t. Misspellings, typos, and links to pages that don’t exist on your website (anymore) are classic signs of genuine errors. These, you should fix.
On the other end of the spectrum are the errors caused by malicious users, spammers, and bad bots. For example, if you see a broken link about a “free iPhone 10” on a recipe blog, then it’s obvious that it’s spam. You can then ignore the error, and even delete it from your 404 logs.
Now that you understand how to deal with the errors, let us understand how to make sense of the data and prioritize your errors.
2 Searching, Filtering, and Sorting the Data
A few 404 errors are manageable, but when you are dealing with hundreds, even thousands of errors, you need efficient ways to slice through the errors. Let us explain a few methods that you can use to search, filter, and sort the data.
2.1 Increasing the Number of Visible Errors on the Screen
Rank Math displays 100 errors on the screen by default. But, you can increase that number to have more errors visible on the screen. You can then use the sorting options (discussed below) to analyze the data better.
To increase the number of visible errors, click the “Screen Options” button on the top of the screen.
The page will shift, revealing the pagination option. Enter the new limit and click the “Apply” button.
The page will refresh, and you should see now see more errors on the screen.
2.2 Searching and Filtering the Errors
You can use your browser’s search functionality to find the errors you’re looking for. For most browsers, the keyboard shortcut is
Ctrl + F on Windows and
Cmd + F on a Mac. You can also check your browser’s menu for the search option.
The second option to search the errors is to use Rank Math’s search option. Enter the part of the URL that you want to search for in the search field, and click “Search”. The Search option only works on exact match, so enter the part of the URL exactly as it appears in the URI field. Here is an example.
2.3 Sorting the Errors
You can also sort the errors by URI, Hits, or Access Time. This lets you see the most recent errors, pages with the most number of hits, or look through the errors alphabetically.
To sort the errors, click on the header of the field you’d like to sort the errors from. Here is how you can do it.
You can also toggle between an ascending sort and a descending sort by clicking the header one more time. Here is a demonstration.
Note: In the Simple 404 Monitor – sorting can be done based on URI, Hits, and Access Time. In Advanced Monitor, sorting can be done based on URI and Access Time only.
Now, we’ve learned how to think about solving the errors, and how to slice and dice the errors to our advantage. Now, it is time to fix the errors.
3 Fixing the Errors
When you have just a few errors, you can go about fixing one at a time without putting much thought into it. But, when your website grows and starts getting hundreds of 404 errors a day, you need a strategy. Here are some potential strategies that you can use.
3.1 The High Hits
The easiest strategy to tame 404 errors is to start with the error with the maximum number of hits. Since more hits mean more users are trying to access the page, this strategy has a high impact.
To use this strategy, you will have to sort your errors in descending order of hits. To do that, hover over the Hits field. You should see an arrow pointing upwards. Click the Hits field to have the errors arranged in ascending order of Hits. Click the field again to have the order reversed to descending. When the downward-facing arrow is visible even without hovering, you can be sure that the order is descending.
Now you can point out the error with the most impact on your website, and it is time to fix it. If you have the Advanced Mode active, you can check the referral data and then decide what to do with the error. If it is an internal error, you can navigate to the post with the error and fix it; else, you can redirect it to the appropriate URL. Here is how to redirect the error-causing URL.
Hover your mouse over the error you want to fix. You should see 2 options appear below it. Click the Redirect link. If you’re unable to find the Redirect link, make sure that you’ve enabled the Redirections module under Rank Math > Dashboard > Modules in your WordPress admin area.
You will be taken to Rank Math’s Redirection Tool, which should look similar to this:
If you have followed Rank Math’s Redirection Guide, then this screen should look familiar to you. Here is a quick overview of the options on the screen.
- Source URL: This will automatically be populated with the error-causing URL. You don’t need to change it.
- Match: This field lets you configure if you want to redirect a single URL or multiple URLs that match a specific pattern. Since we’re redirecting only a single URL, we’ll keep it at “Exact”. We’ve covered the other options this setting offers in its dedicated tutorial.
- Destination URL: This is the URL where you want to redirect the error-causing URL. Please note that you have to enter the full address here, like,
http://www.mywebsite.com/new-link/and not just part of the URL as you see in the Source URL field. Also, this URL can be a link to another page on your website or even an external link to another website.
- Redirection Type: There are many types of redirection options, but generally for 404 errors, you would choose 301 Permanent Move. We’ve discussed all the available options in the Redirection knowledge base.
- Maintenance Code: Maintenance codes are used when there is no suitable replacement for the URL you’re redirecting, and you’re simply communicating to the search engines that the content is not available. If that is the case with your URL, then you can choose one of the Maintenance Codes. Note that choosing any of the Maintenance Codes automatically de-selects the Redirection Types, as you can select only one of them at a time.
- Status: This option lets you enable or disable the redirect. This option is useful in many cases, but for a 404 error, you would simply leave it at Activate.
- Scheduled Activation: This option enables you to set a start date to activate the redirection. This is optional.
- Scheduled Deactivation: This would let you set the end date for a redirection. Similar to the previous one, this is also optional, you may leave it blank.
Now that you’ve understood the settings, it’s time to configure them. If you notice, all you have to enter is the Destination URL; the rest of the fields will be left like it is. Once you do enter the Destination URL, click “Add Redirection” to save.
The Redirect will be saved, and you should reach the page which lists all the redirects present on your site with the one you just created on the top.
Since your error URL is now redirected, it will not be captured by the 404 Monitor again. If you want to see how many times the page is still being accessed, then you can come back to the redirections page and check the “Hits” field. The number of hits here is similar to the 404 Monitor and simply represents how many times a redirection has taken place.
To fix more redirects, you’ll have to head back to the 404 Monitor.
You should also delete the error you just fixed by hovering over the error and clicking the Delete option.
We will also share how you can delete multiple entries of the same error in a single step later in the article.
3.2 One-off Errors
First, we fixed the errors with the most number of hits. If you’re lucky, then all your 404 errors will fall under that category. But, what if you have a lot of errors with different URIs?
In that case, you have to investigate each error individually and fix it in the most appropriate way. Let us take an example.
Look at the URI of the error and see if it looks familiar. If you recognize the URI and know a similar post on your website, then you can simply redirect the URL to a new one using the process we showed above.
If your website has tons of posts, it would be wise not to rely on memory alone. Just head over to your posts inside WordPress and search for the post using the search option.
If you find the post, redirect the error-causing URL to the new destination. If you don’t, it is best to ignore the error, or even delete it from the logs.
If you’re using the Advanced mode and see that the referral for the error-causing URL is an external site, you can also contact the website owner to clarify which post or page they intended to link to. If the website owner responds and fixes the error, then you can score a nice backlink to your website.
To delete the unwanted 404 errors, hover over the URI and click the delete button from the options that appear below it.
4 Bulk Actions
When you have just a few 404 errors, you can fix them one at a time. But, what if you have hundreds, or even thousands of errors to deal with? What do you do in that case?
Rank Math comes to the rescue. We’ve built-in sophisticated bulk actions into Rank Math, using which you can apply all the operations that we discussed above to any number of errors together. Let us show you how.
You can check out the bulk actions supported by Rank Math by clicking the Bulk Actions drop-down menu.
As you can see, both Redirection and Delete are available as bulk actions, and here is how to use them.
First, select all the entries that you’d like to apply the bulk action on.
Select the appropriate bulk action from the Bulk actions menu, and hit Apply.
And you’re done.
Important Note: If you choose Redirect as the bulk action, then all the URLs you select will be redirected to a single destination URL of your choice. Here is how it will look on the redirection screen.
So, if you intend to redirect URLs to different destinations, then select them in different bulk operations, not all at once.
The third bulk action is the “Clear Log” option. It’s basically a nuke option which will delete all the 404 errors ever recorded. This option might be useful for testing purposes, but it’s unlikely that you would use it during the normal course of management of your website. Use it only if you know what you’re doing. Once the log is cleared, only the errors that are recorded after the clear will be displayed, and there is no way to get the lost data back. Proceed with caution.
We hope that now you understand how to fix the 404 errors on your website using Rank Math’s 404 Monitor. The process is quite simple, but you do need to understand the thinking behind choosing the right method to go about it. If you have any questions or face any issues while fixing your 404 errors, do not hesitate to get in touch with our support staff. We are available 24×7, 365 days a year, and will help you with any issues that you might face.