What is a 404 Error
A 404 error on the internet refers to the 'page not found' message you get on your browser at times while navigating to a website. By definition it is an HTTP status code. What it means is that your computer made a request for a specific webpage to the server and the server was unable to find that page.
How does it work?
Over the internet, your computer communicates with other computers or servers on the internet by following a set of protocols or rules. One such set of protocols is known as the Hyper Text Transfer Protocol or HTTP. The HTTP has a set of codes which translate to specific messages. So when you type in the Google URL in your web browser, your computer is actually communicating with the Google server, in a code called the HTTP. You of course only see the Google homepage within seconds on the screen and none of this coded communication.
When you type in the URL, you are asking your computer to locate a resource (webpage) from a particular server. This request is sent to that server. When the server is not able to locate that resource, it sends a 404 status code. This code means 'File not found' which means the resource requested by the computer is not found. There any many other codes, for e.g. code 307 which means the resource (webpage) has shifted to a new address or code 200 which means the page is OK and is displayed normally.
Why does this happen?
The reasons of a 404 occurring and the subsequent error message being displayed on your screen are contained within the code itself. 404 is broken down in the following manner:
4 -- There's been a client error. The 'client' is your computer or you. It means you've probably typed the wrong URL or misspelled it.
0 -- There's been a syntax error that could also be a spelling error.
4 -- There's been a specific error in the group of 40x.
Of course we wouldn't really understand this and hence every 404 message contains human readable text that explains what the error is, why it might have happened and what you could to correct it. Typically the message will read something like this:
Some servers send a 'soft 404' message to your computer. When the particular resource cannot be found, instead of sending an error page with a 404 status code, the server sends an OK page which has a 200 status code. This OK is not the URL you wanted and is instead the home page or the same page as you were on before, refreshed. What happens is you end up confused. Also soft 404 are often mistaken as broken links.