HTTP Status Codes: Causes and Corrective Actions

HTTPS or HTTP status codes are issued by a server when a client makes a request to the server when you visit a website. The hosting server sends the codes to the requesting device. These codes let the requesting device know how to handle the connection. Essentially, the hosting server tells the requesting device how to handle the request and what to do next.

There are five standard classes of hypertext transfer protocol (HTTP) status codes:

  • 1XX informational response (request received) - no errors
  • 2XX successful request (request understood and accepted) - no errors
  • 3XX redirection (further action required to complete request) - potential error
  • 4XX client error (request cannot be completed) - definite error
  • 5XX server error (server failed to fill valid request) - definite error

In this article, we’ll discuss some of the most common HTTP error codes and success codes, like redirect codes (3XX), client error codes (4XX), and server error codes (5XX).

1XX informational codes

The HTTP response codes category 1XX tells users that the server received their request successfully and will continue processing it. These codes are temporary and don’t indicate any disruption in the procedure.

100 Continue

Everything is happening as it should and the client can continue with the request.

101 Switching Protocols

The server understands the Upgrade header field requests, and therefore, it indicates what protocol to which the server switches.

102 Processing

This status code indicates that the server successfully received the request and is currently processing it. There is no response available yet.

2XX Successful Request Codes

2XX status codes indicate that the request was successfully completed. The end user device received, understood, and accepted the action request, and the client can move forward with other actions or requests.

200 OK

The request is okay and was successfully performed. The meaning of “success” depends on the HTTP method:

  • If it uses GET, it means the resource was fetched and transmitted in the message body.
  • If it uses HEAD, it means the response included representation headers without a message body.
  • If it uses PUT or POST, it means the body of the message transmits the resource describing the action result.
  • If it uses TRACE, it means the message body contains the request message as the server got it.

201 Created

The request succeeded and created a new resource.

202 Accepted

Though the request was received, it was not yet performed. This request is typically sent when another server handles the request.

203 Non-Authoritative Information

The returned metadata is collected from a third-party copy or source as it is not exactly available from the origin server.

204 No Content

There is no content to send to the user for this request.

205 Reset Content

The user agent must reset the document which sent this request.

3XX Redirection Codes

The status code category 3XX tells the client that they need additional measures in order to complete their request. The target might have been moved to a different location or otherwise needs to be accessed at a new source.

301 Redirect or 301 Moved Permanently

The link you are attempting to connect has been redirected and moved permanently. Future requests should connect to the new link.

302 Found

The link you are attempting to connect has been temporarily redirected. Future requests should continue to use the same link. However, the original URL remains valid.

303 See Other

A separate GET request to another storage location must be sent in order for the client to receive the resource or page they are looking for.

304 Not Modified

The resource hasn't changed since the last inquiry from the client. It won't be transmitted again.

307 Temporary Redirect

The resource the client requests has availability on the webserver, but temporarily can't be found at its original URL. Similar to a 302 or 303 error, this requires the temporary use of a different URL. The original URL still remains valid. The browser follows the same method as used for the original request.

308 Permanent Redirect

The resource is permanently located at another Uniform Resource Indicator (URI). This status code indicates the location with the HTTP response header.

4XX Client Error Status Codes

The status code category 4XX tells users that there is an issue with their request, not with the server. These errors can occur for a variety of reasons, such as if the user misspells a URL or if a website no longer exists on the web. It's a disconnect between what the user is attempting to access and its availability to the user.

400 Bad Request

The server to which you are trying to connect could not understand the request. Potential causes for the 400 error code include a malformed request syntax, an invalid request message framing, or deceptive request routing.

In order to correct the error, do not repeat the request. Modify the link before making any future connections. Furthermore, check that you entered the URL correctly and that the link you clicked contains the correct URL.

List of HTTP codes

401 Unauthorized

The user is unauthorized to access the target resource. In other words, the request could not be authenticated. This can occur if a client fails to provide proper authentication to the server they are trying to access or if the server banned the client.

To correct the error, first check the URL to ensure its accuracy. Then, flush the DNS and clear browser cookies. Log out and log back in. If none of these actions work, it could be the case that the website’s server is down. In this case, try contacting the webmaster of the website.

403 Forbidden

The server is refusing the request. The client is forbidden from completing the request. For example, the user might not have the necessary permissions or the user may be attempting a prohibited action. 403 error codes are similar to 401 codes, but with a 403 forbidden error, re-authenticating makes no difference.

If you receive a 403 error code and feel it was made by mistake, contact the webmaster of the website to request access. In rare cases, the code could be caused by an error on your end. With any error code, it’s always worth a shot to check the URL, refresh the page, and clear your cookies and cache.

404 Not Found

The requested resource could not be found. This could be temporary or permanent.

404 Page Not Found errors are one of the most common errors on the Internet. They occur when you have successfully communicated with the server, but the server cannot find what was requested. For example, a dead link can cause a 404 error.

This happens often because web administrators frequently update pages without updating corresponding links elsewhere on the Internet. To correct the issue, first refresh the page. Check the URL and delete the cache and cookies. Browse the website or use a search engine to locate the page you're trying to view.

You can contact the webmaster of the website if the Contact Us or Support pages are available. If the entire site is down and no pages are accessible, they may be experiencing an outage. You can try again later.

405 Method Not Allowed

The server's configuration does not allow for the specific action to be performed with a particular URL. For example, a form with a GET request that requires data to be presented via POST request may cause with error.

Another common cause of this error is simply inputting an incorrect URL. If that isn't the case, the error is likely a server issue.

407 Proxy Authentication Required

Like a 401 error, the user does not have proper authorization to access the target resource and the server cannot authenticate the request. However, with this error, the authentication must be done via proxy.

408 Request Timeout

Users receive this response on idle connections, as the server wants to shut down the unused connection. To resolve this error, try the webpage again by refreshing the page or reentering the URL in the address bar. In many cases, this error is just temporary.

409 Conflict

The server indicates a request conflict with the intended resource as it exists currently. To fix this error, you could try a couple of different things. First, a simple refresh might work; try refreshing the website and see if it resolves the problem.

Double-check to ensure the URL you entered into the address bar is correct. If it is, try a different browser and see if you receive the same error. You can also clear your browser’s cache and see if the conflict dissolves.

410 Gone

The requested content was permanently deleted from the server and there is no forwarding address. To resolve this error, disable plugins or fix issues on your website that are causing compatibility issues with the server.

414 URI Too Long

The server cannot interpret the URI the client requested due to the URI's length. To fix this issue, you likely need to adjust the configuration file to allow for longer URLs. You can do this through the server’s configuration file.

415 Unsupported Media Type

The sever does not support the media format of the requested data. Therefore, the server rejects the request. In some cases, the resource's headers cause the issue.

Fixing these errors is sometimes difficult due to the dependence on both the sender and the recipient. Ensure that you’re sending the right header values and that your server can process the defined values. 

417 Expectation Failed

The command's proceedings could not meet the expectation provided in the request's Expect header. If this happens, you need to check the Expect header and make sure everything is correct.

421 Misdirected Request

The request went to a server that cannot return a response because it lacks the configuration to do so.

431 Request Header Fields Too Large

The server will not process the request due to the size of the header fields. To resolve this error, reduce the size of the request header fields and resubmit the request.

5XX Server Error Status Codes

The status code category 5XX is the opposite of status code category 4XX; it means the error was on the server's end, not the client's. However, it still essentially stems from a disconnect between the client and the what is available to the client.

500 Internal Server Error

When an unexpected 500 error occurs without a specific reason for the error, the server prevents the completion of the request. Because 500 server error codes are so generic, they are fairly difficult to troubleshoot. Additionally, since it’s a server error rather than a client error, there is likely nothing you can do to solve it.

If you receive a 500 error code, contact the website if a Contact Us page is viewable. Also, it’s always worth a shot to check the URL, refresh the page, and clear your cache.

501 Not Implemented

The server does not support the functionality required to complete the request. This response code occurs when the server does not recognize the request method. For a list of HTTP request methods and their support for each browser, visit Mozilla.org.

502 Bad Gateway

One server received an invalid response from the other, and there is an issue with the destination website’s server communication.

503 Service Unavailable

The server is unable to process the request at this time. Usually, service unavailable error codes mean the site is down for maintenance or overloaded. Typically, this is a temporary state. The best thing to do when you encounter a 503 error is to try again later.

504 Gateway Timeout

The server did not receive a timely response from the upstream server in order to complete the request. Your server, acting as a gateway, waits too long to receive a response from the upstream server and times out. This usually happens when the upstream server is down or overloaded

If you encounter a 504 Gateway Timeout error message, the first thing you should do is repeat the request. If that doesn't work, reboot your network devices and check your DNS and proxy settings.

505 HTTP Version Not Supported

The server does not support the HTTP version, making it unable to communicate with the client. If you receive this error, check the URL to make sure it is correct, and make sure you are using the latest version of your browser.

For a complete list of HTTP Status Codes, please visit IANA.