HTTP Error and Status Codes Explained

Understanding webpage errors and what to do about them

When you visit websites, your browser—the client—makes connections to web servers via a network protocol called HTTP. These network connections support sending response data from servers back to clients including the content of webpages and also some protocol control information. Occasionally, you may not be successful in reaching the website you are trying to reach. Instead, you see an error or status code. 

Types of HTTP Error and Status Codes

Included in the HTTP server response data for each request is a code number indicating the result of the request. These result codes are three-digit numbers divided into categories:

  • 100-199: informational status
  • 200-299: success status
  • 300-399: redirection status
  • 400-499: client errors
  • 500-599: server errors

Only a few of the many possible error and status codes are seen on the internet or intranets. Codes related to errors are typically shown in a webpage where they are displayed as the output of a failed request, while other status codes are not displayed to users.

200 OK

Error 200
Wikimedia Commons

In the case of the HTTP status 200 OK, the web server processed the request successfully and transmitted content to the browser. Most HTTP requests result in this status. Users rarely see this code on the screen as web browsers usually only show codes when there is some problem.

Error 404 Not Found

When you see HTTP error 404 Not Found, the web server could not find the requested page, file, or ​another resource. HTTP 404 errors indicate the network connection between client and server was made successfully. This error most commonly occurs when users manually enter an incorrect URL into a browser, or the web server administrator removes a file without redirecting the address to a valid new location. Users should verify the URL to address this problem or wait for the web administrator to correct it.

Error 500
Wikimedia Commons

With HTTP error 500 Internal Server Error, the web server received a valid request from a client but was unable to process it. HTTP 500 errors occur when the server encounters some general technical glitch such as being low on available memory or disk space. A server administrator must fix this problem. More »

Error 503 Service Unavailable

Error 503
Public domain

HTTP error 503 Service Unavailable indicates a web server cannot process the incoming client request. Some web servers use HTTP 503 to indicate expected failures, due to administrative policies such as exceeding a limit on the number of concurrent users or CPU utilization, to distinguish them from unexpected failures that would normally be reported as HTTP 500.

301 Moved Permanently

Error 301
Public Domain

HTTP 301 Moved Permanently indicates the URI specified by the client has been moved to a different location using a method called HTTP redirect, which allows the client to issue a new request and fetch the resource from the new location. Web browsers automatically follow HTTP 301 redirects without requiring user intervention.

302 Found or 307 Temporary Redirect

Error 302
Public Domain

Status 302 Found is similar to 301, but code 302 was designed for cases where a resource is moved temporarily rather than permanently. A server administrator should use HTTP 302 only during brief content maintenance periods. Web browsers follow 302 redirects automatically like they do for code 301. HTTP version 1.1 added a new code, 307 Temporary Redirect, to indicate temporary redirects.

400 Bad Request

Error 400
Public Domain

A response of 400 Bad Request usually means the web server didn't understand the request because of invalid syntax. Normally, this indicates a technical glitch involving the client, but data corruption on the network itself can also cause the error.

401 Unauthorized

HTTP 401 "Unauthorized"
Public Domain

The 401 Unauthorized error occurs when web client requests a protected resource on the server, but the client has not been authenticated for access. Usually, a client must log in to the server with a valid username and password to fix the problem.

100 Continue

HTTP 100 "Continue"
Public Domain

Added in version 1.1 of the protocol, HTTP status 100 Continue was designed to utilize network bandwidth more efficiently by allowing servers an opportunity to confirm their readiness to accept large requests. The Continue protocol allows an HTTP 1.1 client to send a small, specially configured message asking the server to reply with a 100 code. It then waits for the response before sending a (typically large) follow-up request. HTTP 1.0 clients and servers do not use this code.

204 No Content

2014 error
Public Domain

You'll see the message 204 No Content when the server sends a valid reply to a client request that contains header information only—it does not contain any message body. Web clients can use HTTP 204 to process server responses more efficiently, avoiding refreshing pages unnecessarily, for example.

502 Bad Gateway

HTTP 502 "Bad Gateway"
Public Domain

A network issue between the client and server causes the 502 Bad Gateway error. It can be triggered by configuration errors on a network firewall, router, or other network gateway device.

Was this page helpful?