What is HTTP Error 404 Not Found – How to Fix It?

HTTP response status codes can be tricky to track down, especially those indicating an error. The Error 404 Not Found is a HTTP response status code indicating that upon a request from a server (remote computer), the server could not find what was requested by the client (web browser), and thus, a 404 Not Found Error is returned.

In this article we’re going to discuss the possible reasons behind an Error 404 Not Found, and how to fix it, but first:

What is Error 404 Not Found?

As mentioned before, an Error 404 Not Found appears when a client manages to communicate with the server, and requests a specific resource (page or URL), but the server could not find a valid resource at the requested location.

Typically, this happens when the server does not recognize as valid the URL that was specified by the client. As we will discuss further on in this article, there are a number of reasons why a URL may be considered invalid by the server.

Sometimes, when an invalid resource is requested, web applications might return soft 404 errors, which usually happen when the server returns a 200 ok response code, signaling that the resource loaded as expected, however, it’s followed by the displaying of a custom 404 page, indicating that the resource was not actually found. From an SEO standpoint, this is deemed as a bad practice since web crawlers rely on legitimate 404 Not Found Errors to determine the validity of resources/links.

Here is a screenshot of Moz.com’s custom error page:

custom 404 error pages

404 Not Found Error – How to Fix It?

HTTP response status codes in the 4xx category are client-side errors, as opposed to the 5xx category, which are server-side error responses like the 502 Bad Gateway Error or 500 Internal Server Error.

Despite being considered a client-side error, server errors cannot be entirely ruled out in case of a 404 Not Found Error, which is why we’re going to explore both client-side and server-side causes of this error, and also address problem areas within content management systems that might return an Error 404 Not Found.

However, before you start testing out any potential fixes to a 404 Not Found error, a word of advice: create a full backup of your database or application, or create a copy of the application onto a staging server to avoid any issues on your live application.

Error 404 Not Found Client-Side Troubleshooting

We’ll start with troubleshooting on the client side, since client-side issues are the most likely to cause this error.

Verify the requested URL

Typos in some part of the URL are often the culprits when a 404 Not Found Error is returned. While domain names are case-insensitive, meaning that both EXAMPLE.COM or ExAmPle.cOm would return the same result, parts of a URL that appear after the domain name are case sensitive.

Clear Cookies

Another possible fix for a 404 Not Found Error is to clear cookies that match the website domain. Invalid or corrupted cookies may create confusion with regard to your identity or it may lead a server to think that you’re trying to access a resource that either doesn’t exist, which can result in a 404 Error.

Here are some useful guides on how to clear cookies in different browsers:

Log Out & Log In Again

This fix is useful when some form of user authentication is used by your application. In these cases, the server might be experiencing a problem with your session token (it could be that it doesn’t recognize it, or it considers it invalid), which would explain the 404 error. Logging out and in again will recreate the local session token, and fix the error.

CMS-Related Fixes

If you’re using popular content management systems like WordPress, Drupal, or Joomla, you may experience 404 Errors due to certain problems with modifications that you’ve made or extensions that you’ve added to these systems. The following tips may help in troubleshooting these CMSs:

  • Revert to a previous version – if the 404 Not Found Error appeared just after a recent upgrade to your CMS, try reverting to the previous version before the error appeared;
  • Uninstall recently added plugins, extensions or modulessimilarly to upgrading your CMS, installing new extensions, modules or plugins or upgrading them can create server-side issues that will return a 404 Error. Uninstalling these plugins, modules or extensions or downgrading to a previous version, thus reverting the changes made by these;
  • Manually check for database changes – sometimes rolling back to a previous version of a plugin or extension may not undo the changes performed to the database. In this case, you need to open the database and manually check tables and records for modifications performed by the extension or plugin.

If you need help with downgrading your CMS or uninstalling an extension, plugin, or module, Google the CMS name or extension name, or consult official documentation and follow along the instructions provided.

Error 404 Not Found Server-Side Troubleshooting

We’ve already mentioned that although an Error 404 Not Found is typically a client-side error, server-side issues may also come into play when this error is returned. Here are a few culprits on the server-side:

Web Server Configuration

Depending on the type of server your application is running on (Nginx, Apache, IIS, etc.), your server may be configured to reject requests to certain URLs or directories, and to return a 404 Not Found Error. You can adjust your server’s configuration with the help of the configuration files provided with your web server.

Custom Code

Another thing that could cause the issue is a custom code in your application. In this scenario, manual debugging and parsing through logs can help you identify what caused the issue. Here too, creating a copy onto a staging server is the ideal way to approach the debugging process.

Finding Invalid Links

There are a few automatic tools that you can use to detect invalid links or particular URLs or resources. One example would be registering your site with Google Search Console, which will detect invalid links along with other problems found by the Googlebot while crawling your website. Alternatively, if you’re looking to check particular resources, you can use the W3C Link Checker.

As you can see, there are many possible causes to a 404 Not Found Error, yet most issues can be rapidly identified and fixed. If you do a Google search for the CMS you’re using (Drupal, Joomla, WordPress, etc.) followed by the 404 Not Found Error, you will find many solutions provided to other uses experiencing this issue.


David Cross

David is the chief editor at WebHostingMedia right from the beginning. He has a great passion for building and managing websites and creating helpful content. He is also interested in programming - currently learning python.