Tutorials UPDATED: 11 December 2024

Fix WordPress 404 Errors: A Step-by-Step Troubleshooting Guide

Tassos Antoniou

8 min read

Have you ever received the “404 Page Not Found” message while surfing the internet and didn’t know what it was? Are you working on your website and would like to protect it from 404 errors? In this article, we will explain what is the 404 error, why it shows, and how to avoid having 404-related issues on your website.

What is a 404 error?

The HTTP 404 Not Found response message states that the server could not find the requested resource. It is the universal HTTP status code for a failed request that is sent from the server, back to the browser that sent the request. It is part of the web’s Hypertext Transfer Protocol response (HTTP) codes.

There are various reasons why you might get a 404 error message. You may be using a search engine and clicking a link that redirects you to a missing page. Sometimes you click on a link in an e-shop or other site that leads you to an internal URL that no longer corresponds to a page.

This error itself doesn’t let us know why there is a problem. If, for example, we see this error in a file link, we do not know if the file is indeed missing or if just the path in the link is not the right one.

Error Message Variations

The most common variations of the message displayed on a 404 error, depending on the browser, are:

  • Error 404
  • 404 Not Found
  • HTTP Error 404
  • Not Found
  • Page Not Found
  • The page cannot be found
  • The requested URL was not found on this server

What triggers 404 errors on a WordPress website?

There are various reasons might see a 404 error message, and it does not always mean there is something wrong with the website. As a user, you may type a URL wrong and cause a 404 error. There is nothing wrong with that; rather, it is the correct response!

Apart from the typo, there are several other reasons that can cause the error, which may indeed have an impact on your work.

If the error occurs on specific pages, it is likely that the slug was modified at some point without a redirect being applied to it. For example, if you create a post with the slug “about-us” the visitor will use a link that redirects them to that post and view the page. If for some reason you change the slug to, let’s say, “company” then the visitor may get the 404 message. That is, of course, if no redirects have been applied to avoid this. We will see more about the precautionary measures you can take when updating links later on.

There is also the case where the error is triggered on all of the website’s pages. This is an indication that there is an issue with the permalinks.

Also, the error can be triggered if a file is deleted from the server or moved to another path.

It is a common case in general for many broken links to be overlooked for a while. As a result, lots of websites still rank in search engines, even though some of their URLs are not available anymore.

It often happens that you get a 404 message when following an external link from inside a website, because external links to other websites, like blogs or portals, are also not regularly checked, which also leads to 404 errors.

The impact of 404 errors

The 404 errors will eventually make both users and search engines lose trust in your content and consequently damage your website’s ranking and reputation.

If these problems occur on the website on a consistent basis, many users won’t bother using the search engine results from your website since they won’t be sure whether the content is still accessible or not.

Try our Award-Winning WordPress Hosting today!

On the other hand, search engines have difficulty scanning websites that include 404 errors appropriately, and they do not really appreciate that fact. Once their crawlers realize that many queries result in 404 messages, they assume that the website isn’t adequately maintained and may lower its position in the search engine results page (SERP) or perhaps cease indexing it all together. Because of this, it’s possible that the website will see a significant drop in the number of visitors.

Check and monitor your website on 404 errors

All that being said, it is essential that you take precautionary measures to prevent HTTP 404 pages, both internally and externally. But first, you have to identify the problem.

Fortunately, there are free tools available out there to support you in finding the broken links that trigger the 404 errors on your website. Let’s see some useful stuff.

Google Search Console

When logged in to your Google account, go to the Google Search Console overview page. In the upper left, choose the domain of the website you want to check.

In the upper right corner, you can use the notifications icon to display your messages

A panel will then appear that will walk you through fixing your 404 pages by displaying a table with the related URLs.

Other popular free tools that can help you with this are Google Analytics, W3C Link Checker, Deadlinkchecker, and ATOMSEO.

Fix the 404 errors

To fix an issue, we have to detect it first. Some advanced hosting providers, like Pressidium, provide their own tools to help you quickly see if your site visitors are requesting information on your site that isn’t available. However, if that is not the case, we will see how you can identify 404 triggers in the next few paragraphs.

Now let’s see how you can achieve a 404 error fix.

Typos

First, we will get rid of the more practical possible reasons. So before you proceed to further troubleshooting, make sure you have checked the URL for all possible typos, like spelling mistakes or missing trailing slashes.

Browser (being the user)

If the error occurs on a certain device only, it is likely that the culprit is related to cache. In that case, you should delete the browser cache and cookies.

WordPress 404 Error Plugins

There are some great plugins that can help you deal with 404 errors. Let’s look at two of them.

All 404 Redirect to Homepage

If you seek a quick and simple solution, then this plugin is the way to go. It saves you time from creating all the redirects for the non-working URLs and simply redirects all of them to your homepage. You can fix the problem in no time. Once you install and activate it, make sure it is enabled, and you’re done. However, if you want more options, you can go to its settings.

There, you can change the default redirection URL, which is your homepage. Before you change it, make sure you fill it in with a valid URL; otherwise, you will fall into a redirect loop. Further down below, you can enable the same redirect functionality for the not found images as well or redirect them to a specific image you upload.

NOTE: Keep in mind that Google does not really like homepage redirecting. They recommend that website owners have a custom user-friendly 404 page as it handles the redirect as a “soft-404 error,” a fact that may affect your SEO.

Also, there is a link to the 404 Image Redirection plugin in case you want to replace broken images in posts and pages with a default image.

You also see a 404 URLs tab.

The 404 URLs tab is there for you to see the 404 links that have already been redirected.

Use 301 Redirects

If you have URLs that are permanently moved, a plugin that could be really helpful is the 301 Redirects plugin.

You can easily prevent visitors from experiencing 404 errors by redirecting them to another URL by creating 301, 302, or 307 redirects.

Under Settings -> 301 Redirects, you can find all you can do. The free version allows you to create and manage your redirects, see logs to identify the 404 triggers, and import redirection rules from a CSV file or export your own redirect rules.

Other plugins we recommend alternatively are the Quick Page/Post Redirect Plugin and the SEO Redirection Plugin.

Conclusion

Avoiding 404-related issues is of great importance for your website’s user experience and eventually SEO performance. Hopefully, we are now familiar with what a 404 error is about and how to deal with it. In the next article, we will dig into details on how to create your own 404 page and why it is useful to do so. Stay tuned!

Start Your 14 Day Free Trial

Try our award winning WordPress Hosting!

OUR READERS ALSO VIEWED:

See how Pressidium can help you scale
your business with ease.