Home >Web Front-end >CSS Tutorial >http status code list_basic tutorial
We often encounter 404, 500, 302 and other prompts. What do they mean? In addition to these common status codes, are there any other status codes that we have not encountered but may appear? Here I have made a summary and share it with you.
HTTP Status Code Summary Description
--------------------------------------------- -------------------------------------------------- ------------------
Success 2XX Status code for successfully processing the request.
200 The server has successfully processed the request and served the requested web page.
204 The server successfully processed the request but did not return anything.
Reinstance to 3XX Each request for each request for more than 5 times.
301 The requested web page has been permanently moved to a new location. When URLs change, use the 301 code. Save the new URL in the search engine index.
302 The requested web page is temporarily moved to a new location. The original URL is saved in the search engine index.
304 used to tell the search engine bots if the webpage not been updated since the requester's last request, save bandwidth and overhead.
Client error 4XX indicates that the request may be in error, preventing the server from processing it.
400 The server does not understand the syntax of the request.
403 The server refused the request.
404 The server cannot find the requested web page. This code is often returned for web pages that do not exist on the server.
410 The server returns this response after the requested resource is permanently deleted. This code is similar to the 404 (not found) code,
but is sometimes used instead of the 404 code when the resource previously existed but now does not. If a resource has been permanently deleted, 301 should be used to specify the resource's new location.
Server error 5XX means that an internal error occurred while the server was processing the request. These errors may be errors on the server itself rather than an error in the request.
500 The server encountered an error and was unable to complete the request.
503 The server is currently unavailable (due to overload or downtime for maintenance). Usually, this is a temporary state.
Detailed breakdown:
2XX Success
200 OK; request completed.
201 Normal; immediately followed by POST command.
202 OK; accepted for processing, but processing has not yet completed.
203 Normal; partial information - only part of the information returned.
204 Normal; No response - The request was received, but there is no information to be sent back.
3XX Redirect
301 Moved — The requested data has a new location and the changes are permanent.
302 Found — The requested data temporarily has a different URI.
303 See Other — The response to the request can be found under another URI and should be retrieved using the GET method.
304 Unmodified — The document was not modified as expected.
305 Use proxy — The requested resource must be accessed through the proxy provided in the location field.
306 Unused — No longer used; retain this code for future use.
4XX Errors in the client
400 Bad Request — There is a syntax problem in the request, or the request cannot be fulfilled.
401 Unauthorized — The client is not authorized to access the data.
402 Payment Required — Indicates that the billing system is in effect.
403 Forbidden — No access required even if authorized.
404 Not Found — The server cannot find the given resource; the document does not exist.
407 Proxy Authentication Request - The client must first authenticate itself using a proxy.
415 Unsupported media type — The server refused to service the request because the format of the requested entity is not supported.
5XX Error in the server
500 Internal Error — The server was unable to complete the request due to unexpected circumstances.
501 Not executed — The server does not support the requested tool.
502 Bad Gateway - The server received an invalid response from the upstream server.
503 Unable to obtain service — The server was unable to process the request due to temporary overload or maintenance.
504 Gateway Timeout
When a server working as a gateway or proxy tries to execute a request, it fails to receive it in time from the upstream server (the server identified by the URI, such as HTTP, FTP, LDAP) or the auxiliary server (such as DNS) response.
Note: Some proxy servers will return 400 or 500 errors when DNS query times out
505 HTTP Version Not Supported
The server does not support, or refuses to support, the HTTP version used in the request. This implies that the server is unable or unwilling to use the same version as the client. The response should contain an entity describing why the version is not supported and what protocols the server supports.
506 Variant Also Negotiates
Extended by the "Transparent Content Negotiation Protocol" (RFC 2295), indicating that the server has an internal configuration error: the requested negotiation variable resource is configured to use itself in transparent content negotiation, so in A negotiated process is not an appropriate focus.
507 Insufficient Storage
The server cannot store the content necessary to complete the request. This condition is considered temporary. WebDAV (RFC 4918)
508 Loop Detected
The server found an infinite loop in the request
509 Bandwidth Limit Exceeded
The server reached the bandwidth limit. This is not an official status code, but is still widely used.
510 Not Extended
The strategies required to obtain resources are not met. (RFC 2774)
How to deal with common errors
500 Error
500 error is a problem that webmasters often encounter. Based on my experience, the reasons and solutions are summarized as follows:
1. There are too many running users, which puts too much pressure on the server. If the server cannot respond, an HTTP500 error will be reported.
This reason is the main reason why websites report 500 errors. Why do many websites suddenly report 500 errors (service unavailable)? 90% are caused by excessive space pressure, exceeding the upper limit set by the space provider.
When encountering this problem, it is best to contact the after-sales service of the space provider as soon as possible. They will usually help you recycle the application pool and the problem will be solved. If you cannot find after-sales service, you can find the "Recycle Application Pool" item in the space management background and execute it manually. However, some space management backends do not provide this service.
2. If the first possibility is ruled out, then the main reason is that there is a problem with the program.
You can make a simple test page to see if it can run successfully, and then detect the error page to make targeted modifications.
If the association is not made where the association should be made, an HTTP500 error will be reported. Perform manual or automatic correlation and the problem is solved.
3. If the operation performed in the test requires inserting data into the database, it is possible that if the large amount of data causes the table space in the database to be full, or the buffer pool is too small to satisfy the data access, etc. Resulting in HTTP500 error.
The solution is to adjust the database, modify the connection pool size, etc., and make corrections according to individual circumstances.
HTTP Status Code Summary Description
------------------------------------------------ -------------------------------------------------- --------------------------
Success 2XX Status code for successfully processing the request.
200 The server has successfully processed the request and served the requested web page.
204 The server successfully processed the request but did not return anything.
Reinstance to 3XX Each request for each request for more than 5 times.
301 The requested web page has been permanently moved to a new location. When URLs change, use the 301 code. Save the new URL in the search engine index.
302 The requested web page is temporarily moved to a new location. The original URL is saved in the search engine index.
304 used to tell the search engine bots if the webpage not been updated since the requester's last request, save bandwidth and overhead.
Client error 4XX indicates that the request may be in error, preventing the server from processing it.
400 The server does not understand the syntax of the request.
403 The server refused the request.
404 The server cannot find the requested web page. This code is often returned for web pages that do not exist on the server.
410 The server returns this response after the requested resource is permanently deleted. This code is similar to the 404 (not found) code,
but is sometimes used instead of the 404 code when the resource previously existed but now does not. If a resource has been permanently deleted, 301 should be used to specify the resource's new location.
Server error 5XX means that an internal error occurred while the server was processing the request. These errors may be errors on the server itself rather than an error in the request.
500 The server encountered an error and was unable to complete the request.
503 The server is currently unavailable (due to overload or downtime for maintenance). Usually, this is a temporary state.
Detailed breakdown:
2XX Success
200 OK; request completed.
201 Normal; immediately followed by POST command.
202 OK; accepted for processing, but processing has not yet completed.
203 Normal; partial information - only part of the information returned.
204 Normal; No response - The request was received, but there is no information to be sent back.
3XX Redirect
301 Moved — The requested data has a new location and the changes are permanent.
302 Found — The requested data temporarily has a different URI.
303 See Other — The response to the request can be found under another URI and should be retrieved using the GET method.
304 Unmodified — The document was not modified as expected.
305 Use proxy — The requested resource must be accessed through the proxy provided in the location field.
306 Unused — No longer used; retain this code for future use.
4XX Errors in the client
400 Bad Request — There is a syntax problem in the request, or the request cannot be fulfilled.
401 Unauthorized — The client is not authorized to access the data.
402 Payment Required — Indicates that the billing system is in effect.
403 Forbidden — No access required even if authorized.
404 Not Found — The server cannot find the given resource; the document does not exist.
407 Proxy Authentication Request - The client must first authenticate itself using a proxy.
415 Unsupported media type — The server refused to service the request because the format of the requested entity is not supported.
5XX Error in the server
500 Internal Error — The server was unable to complete the request due to unexpected circumstances.
501 Not executed — The server does not support the requested tool.
502 Bad Gateway - The server received an invalid response from the upstream server.
503 Unable to obtain service — The server was unable to process the request due to temporary overload or maintenance.
504 Gateway Timeout
When a server working as a gateway or proxy tries to execute a request, it fails to receive it in time from the upstream server (the server identified by the URI, such as HTTP, FTP, LDAP) or the auxiliary server (such as DNS) response.
Note: Some proxy servers will return 400 or 500 errors when DNS query times out
505 HTTP Version Not Supported
The server does not support, or refuses to support, the HTTP version used in the request. This implies that the server is unable or unwilling to use the same version as the client. The response should contain an entity describing why the version is not supported and what protocols the server supports.
506 Variant Also Negotiates
Extended by the "Transparent Content Negotiation Protocol" (RFC 2295), indicating that the server has an internal configuration error: the requested negotiation variable resource is configured to use itself in transparent content negotiation, so in A negotiated process is not an appropriate focus.
507 Insufficient Storage
The server cannot store the content necessary to complete the request. This condition is considered temporary. WebDAV (RFC 4918)
508 Loop Detected
The server found an infinite loop in the request
509 Bandwidth Limit Exceeded
The server reached the bandwidth limit. This is not an official status code, but is still widely used.
510 Not Extended
The strategies required to obtain resources are not met. (RFC 2774)
How to deal with common errors
500 Error
500 error is a problem that webmasters often encounter. Based on my experience, the reasons and solutions are summarized as follows:
1. There are too many running users, which puts too much pressure on the server. If the server cannot respond, an HTTP500 error will be reported.
This reason is the main reason why websites report 500 errors. Why do many websites suddenly report 500 errors (service unavailable)? 90% are caused by excessive space pressure, exceeding the upper limit set by the space provider.
When encountering this problem, it is best to contact the after-sales service of the space provider as soon as possible. They will usually help you recycle the application pool and the problem will be solved. If you cannot find after-sales service, you can find the "Recycle Application Pool" item in the space management background and execute it manually. However, some space management backends do not provide this service.
2. If the first possibility is ruled out, then the main reason is that there is a problem with the program.
You can make a simple test page to see if it can run successfully, and then detect the error page to make targeted modifications.
If the association is not made where the association should be made, an HTTP500 error will be reported. Perform manual or automatic correlation and the problem is solved.
3. If the operation performed in the test requires inserting data into the database, it is possible that if the large amount of data causes the table space in the database to be full, or the buffer pool is too small to satisfy the data access, etc. Resulting in HTTP500 error.
The solution is to adjust the database, modify the connection pool size, etc., and make corrections according to individual circumstances.