Okay, this is a pretty simple one to explain. In short, an error 404 is a code a web server will return if a user attempts to load a page that doesn't exist.
That's it!
Or is it?
What Causes an Error 404?
So as we brought out in the introduction, an error 404 is the error code returned by a server when it fails to find the requested web page. However, it goes a little deeper than the page just not existing.
When you try and load a page on a website, your device will send a request to the hosting server, and it will return to you the files (the web page) you requested. Sometimes, however, the server can't find what you're looking for, and this isn't always because the page doesn't exist.
An error 404 can be caused by a range of different problems:
- The URL has been entered wrong (this could be a typo on the users end, or a misspelling of a button, link or URL of the page)
- The URL has been deleted or moved (without adjusting any internal links)
- The server hosting the website is not running or the connection is faulty
- The IP of the requested domain can’t be converted by the domain name system (DNS)
- The domain name entered no longer exists
Typically, when you encounter a 404 error, the website should take you to a 404 page that explains that there's a problem and offers to take you back. However, in some cases, the site may simply redirect to the home page, leaving users very confused as to why a link they clicked didn't take them to the right content.
How To Fix an Error 404?
At the end of the day 404 errors are errors, and errors need fixing. Users haven't found the content they were looking for and the website might suffer for that in the long term. As we brought out, this doesn't necessarily mean the content doesn't exist. In most cases, the solution is rather simple and the content can be quickly loaded thereafter.
So how can you fix an error 404?
We recommend to try the following suggestions (in the order they are listed):
- Reload the page: It could be that the error 404 has appeared simply because the page didn't load correctly. This can be checked quite easily by clicking on the ‘Refresh’ button in your browser or also by using any of the following hotkeys (Ctrl + R), (F5).
- Check the URL for Typos: Whether you have entered the URL manually or have been directed via a link, it could be that a mistake has been made. For this reason you should check the domain and path of the website, it could be that the link has mistyped something. It may also be that forward slashes '/' are missing or misplaced. This process is only suitable for 'clean' URLs that only contain words and numbers that can be easily understood. Some URLs can appear as incomprehensible strings of letters, numbers, and symbols.
- Go back through the directory levels: If a URL results in a 404 error, you can try navigating back to the previous directory level and searching for the content from there.
For example:
example.com/Directory1/Directory2/Directory3 - This causes an error 404
In this case you could clear the last directory from the list like so:
example.com/Directory1/Directory2
If this page loads, you can check if the link to the desired page is present. If the content is still missing, try going back to further directory levels. On most sites this should work, but if you're still unsuccessful, try our next method.
- Use a search tool: Many websites offer a search tool as part of their homepage or blog page. By entering keywords, it can help you find the specific page that you are looking for.
- Use a search engine: If the website lacks a search tool, you can also use a search engine, such as Google, Bing, or Safari to find a website. As long as the page exists, you should be able to find it by entering the website domain and any relevant keywords.
- Clear your cache and cookies: If you can access the web page from another device, and the HTTP 404 error only appears on a specific device, then the issue may be caused by your browser. You should clear your browser cache as well as all cookies for this site, and this may then finally allow you to access the page. You often find the settings for this under your browsers history settings.
- Contact the website's administrator: If none of the methods above have been successful then the only option left would be to get in touch with the person/ people responsible for the website. Most modern websites have their contact information plastered all over the place, from the header to the footer, and especially on the contact page (obviously). In some cases, a site will intentionally leave a special contact on their error 404 page, allowing visitors to quickly let them know about the issue.
If it is a case of the page directory changing, then you'll be doing the website operator a huge favour by letting them know. They can then fix the error by redirecting the old URL to the new URL.
Do I Need a Custom 404 Page?
Now you know what an error 404 actually is, it's time to understand how to prepare for these inevitable errors as a site owner.
To answer the question, yes, all websites should have an error 404 page prepared and ready, just in case. Having a custom page ready to receive users means that you can always control what they see and how they see it, leading your visitors to other content and creating a streamlined experience, even when a 404 appears.
What would happen if you didn't have one?
Without a custom 404 page, one of two things could happen:
- Homepage Redirect: Some web servers are configured to send visitors back to the websites homepage when a 404 is encountered. Although this takes users back to your main website, it leaves them without any explanation as to why they are back on the homepage, and where their desired content is.
- Generic 404: This is most definitely the worst possible outcome. Not only is the user not served any content, but the page doesn't look like it belongs to your website at all. Most generic 404 pages fail to even link back to your website, leading to lost visitors that likely wont return.
Are There Other Error Codes?
Yes, although you'd be surprised to learn that there are actually only (officially) 63 different HTTP error codes.
You can learn more about 'How HTTP Codes Work' in our article, but for a brief over view, there are 5 different types of HTTP Codes, and not all of them are errors. These types are displayed by the type number followed by the code number
Example:
'HTTP Error 404'
The HTTP code type is 4, displayed by 4, with the code number being 04