An overview of 10 common HTTP status codes

An overview of 10 common HTTP status codes

Overview

The HTTP status code is a 3-digit code used to indicate the status of the HTTP response of the web server. The first digit of all status codes represents one of the five statuses of the response.

When a user attempts to access content on a running host through HTTP or FTP protocols, the Web server returns a digital code indicating the status of the request. The status code is recorded in the server log and may also be displayed in the Web browser or FTP client. This is the error code displayed by the browser when an error occurs when we open a page. The status code can indicate whether a specific request has been successful, and can also reveal the exact reason why the request failed.

HTTP protocol status code

The meanings of HTTP protocol status codes are mainly divided into five categories, which are generally:

  • 1××: Reserved
  • 2××: Indicates that the request was successfully received
  • 3××: To complete the request, the customer needs to further refine the request
  • 4××: Customer error
  • 5××: Server error

According to Google search statistics, the following are the most common errors, among which HTTP 500 errors are twice as likely to occur as 404 errors:

(1) 500 Internal Server Error

The definition of HTTP 500 error has proven that this is the most common HTTP error. Generally speaking, HTTP 500 error occurs when there is an error in the server's program code, or the information returned by the web server when an internal error occurs. For example, when the web server is overloaded, it will not be able to process the access request correctly.

(2) 404 File Not Found

Most people are familiar with this error. A 404 error occurs when a user attempts to access a resource on a web server (usually a web page) that does not actually exist. A 404 error can be caused by a broken link, a misspelling of the URL, or because the web host has moved the requested page somewhere else (or deleted it). Some websites set up custom pages to prevent the adverse effects of broken links.

(3) 403 Forbidden

A 403 error is similar to a 401 error, except that a 401 error is unauthorized, while a 403 error is forbidden. No login will work for a 403 error. A 403 error occurs when you try to access a (forbidden) website directory.

(4) 400 Bad Request

The web server returns the HTTP 400 error to tell the visitor that the program the visitor uses to access the website has an error or the access request has been damaged during the process.

(5) 401 Unauthorized

When a visitor tries to access a restricted page but is not authorized, the website returns an HTTP 401 error. Incorrect login attempts are the main cause of this error.

(6) 200 Request successful

The request was successful and the expected response header or data body will be returned with this response.

(7) 206 Partial content

The server has successfully processed part of the GET request. HTTP download tools such as FlashGet or Xunlei use this type of response to resume downloads or to split a large document into multiple download segments for simultaneous download.

(8) 301 Permanent Redirect

The requested resource has been permanently moved to a new location, and any future references to this resource SHOULD use one of the URIs returned in this response.

(9) 302 Temporary Redirect

The requested resource is now temporarily responding to requests from a different URI. Since such a redirection is temporary, the client SHOULD continue to send future requests to the original address.

(10) 502 Bad Gateway

The server, acting as a gateway or proxy, received an invalid response from an upstream server while attempting to perform a request.

<<:  Understand HTTP and HTTPS protocols in ten minutes?

>>:  The property management company asked for 300,000 yuan as an “entry fee” for 5G to enter the residential area. The real problem is the problems beyond technology.

Recommend

UK 3G networks to end in 2025

British telecom operator Virgin Media O2 (VMO2) h...

Wangsu Technology launches edge AI gateway to help developers build AI

On July 11, Wangsu Technology announced the launc...

Four major battles of the Internet of Things broke out in 2018

The concept of the Internet of Things (IoT) has b...

What is 5G voice like now?

In the 5G era, real-time communication is still a...

Telecom, Mobile, Unicom, it will be too late if they don’t transform

Digital transformation has become a social consen...

5G development is timely and network construction should be moderately advanced

At present, the overall development of 5G in the ...

How to calculate and reduce fiber losses in your network?

Fiber optic networks have become popular over the...