There are many different types of errors that can happen when building a website. Below are a few of the more common codes.
401 : Unauthorized
Access to the URL resource requires user authentication which either has not yet been provided, or which has been provided but failed. This is commonly known as password protection. Unless you have a good reason to do so, it is not recommended to redirect a 401 error.
403 : Forbidden Error
The request was a legal request, but the server is refusing to respond to it. Unlike a 401 Unauthorized response, authenticating will make no difference. This is usually due to a scripting or file permissions issue.
404 : Not Found
This response code indicates that the visitor was able to communicate with the server, but either the server could not find what was requested, or it was configured not to fulfill the request and not reveal the reason. Error 404 should not be confused with "server not found" or similar errors, in which a connection to the destination server cannot be made at all.
406 Error - Not Acceptable
Web browsers make a request for information from the server. When this happens, it sends an Accept header. This tells the server in what formats the browser can accept the data. If the server cannot send data in a format requested in the Accept header, the server sends the 406 Not Acceptable error
500 : Internal Server Error
Your web server encountered an unexpected condition that prevented it from fulfilling the request by the visitor. Basically, something has gone wrong, but the server can not be more specific about the error condition in its response to the visitor.