Today we will learn HTTP errors, you will know what 404 errors are. In fact, there are almost a hundred different error codes. Don’t worry, you don’t have to memorize them all, but there are techniques to figure out roughly where the error is coming from.
Join the channel Telegram of the AnonyViet 👉 Link 👈 |
Why invent these numbers?
But why do we invent these error numbers? The answer is actually quite simple, when a user visits a website through his browser, the browser sends a request to the server according to the HTTP protocol. The server will also respond in HTTP format and if all goes well will send the requested resources (in our case the web page). But things get more complicated when there are errors. Knowing that there is a fault is good, but knowing where the error is is even better. This is why error numbers are quickly assigned to different types of errors. This is much more practical and saves time for many developers. For example, an error starting with 5 is a server level problem.
There are five types of errors
1.Information
2. Success
3. Redirects
4. User error
5. Server Error
So if the error number starts with 4, we know that the problem is from the user.
Why 404 error?
But why 404 error? The first number is 4, which is the error coming directly from the user and not from the server. Indeed, the 404 error means that the resource was not found, the server searched the user’s side but did not find it, so the error comes from the user who did not provide the correct url.
Discover 418 . error
HTTP 418 error has nothing to do with other errors. Indeed its meaning is “I am a teapot”. It has actually been a joke since it first appeared in RFC 2324 on April 1, 1998. The explanations given by the developers are: “There is coffee all over the world. . Increasingly, in a world where computers are ubiquitous, want to make coffee. Coffee making is an art, but the distributed wisdom of the web-connected world surpasses art. Therefore, there is a strong, rich demand for a clearly designed protocol for brewing coffee. Coffee is brewed using a coffee pot. Networked coffee makers require control protocols if they want to be controlled.”
In other words, the Hypertext Coffee Pot Control Protocol, or HTCPCP, aims to send an error back to everyone who wants to control the coffee pot remotely, telling them they’ve mistaken their address for… warm tea.
This April 1st “joke” became famous at the time, and its error code remained the same.
There are still people questioning this 418 error, even today.
Other HTTP Errors
For those who want to find a specific error, you can refer to the error tables categorized by category below.
Some of the code is still unused, but will be used in the future. The other codes don’t lead to any specific impressions to the user, but are still understandable (e.g. 200 or 304 codes, which the client never sees because they’re involved in the vast majority of successful requests. ).
All major HTTP errors are presented in these tables, of different error types:
Codes starting with 1 (Info):
Code | Message | Meaning |
---|---|---|
100 | tiếp tục | Waiting to be processed. |
101 | Switching Protocols | Accept the protocol change. |
102 | Processing | In progress (avoiding the client to exceed the waiting period). |
103 | Early Hints | While waiting for the final response, the server returns links where the client can start downloading. |
Codes starting with 2 (Success):
Code | Message | Meaning |
---|---|---|
200 | OK | The request was processed successfully. The response will depend on the query method used. |
201 | Created | The request was processed successfully and the document was created. |
202 | Accepted | The request is processed, but the outcome is not guaranteed. |
203 | Non-Authoritative Information | Information returned, but generated by an uncertified source. |
204 | No Content | The request was processed successfully, but there is no information to return. |
205 | Reset Content | The request is processed successfully, the current page can be deleted. |
206 | Partial Content | Only part of the resource has been transmitted. |
207 | Multi-Status | Many answers. (WebDav) |
208 | Already Reported | Previous material has been submitted in this collection. (WebDav) |
210 | Content Different | The client-side copy of the resource is different from the server-side copy (content or property). (WebDav) |
226 | IM Used | The server completed the resource request, and the response is the representation of the result of one or more operations applied to the current result. |
Codes starting with 3 (Redirect):
Code | Message | Meaning |
---|---|---|
300 | Multiple Choices | The requested URI refers to some resource. |
301 | Moved Permanently | The document has been moved permanently. |
302 | Found | Document has been moved temporarily. |
303 | See Other | The answer to this request lies elsewhere. |
304 | Not Modified | The document has not been modified since the last request. |
305 | Use Proxy (since HTTP/1.1) | The request must be routed to the proxy. |
306 | Switch Proxy | Code used by older version of RFC 26167, now reserved. It means “The following requests must use the specified proxy”. |
307 | Temporary Redirect | The request must be temporarily redirected to the specified URI. |
308 | Permanent Redirect | The request must be permanently redirected to the specified URI. |
310 | Too many Redirects | The request must be redirected too many times or fall victim to a redirect loop. |
Codes starting with 4 (web client error):
Code | Message | Meaning |
---|---|---|
400 | Bad Request | The query syntax is wrong. |
401 | Unauthorized | Authentication is required to access the resource. |
402 | Payment Required | Payment is required to access resources. |
403 | Forbidden | The server understood the request, but refused to fulfill it. Unlike 401 errors, validation won’t make any difference. On servers that require authentication, this usually means that the authentication has been accepted, but access does not allow the client to access the resource. |
404 | Not Found | Resource not found. |
405 | Method Not Allowed | Unauthorized query method. |
406 | Not Acceptable | The requested resource is not available in a format that complies with the “Accept” header of the request. |
407 | Proxy Authentication Required | Access to the resource is allowed by identification with the proxy. |
408 | Request Time-out | The amount of time the request from the client has been waiting on the server side. According to the HTTP specification: “The client does not make a request while the server is ready to wait. The client MAY repeat the request without modification at any time afterwards.” |
409 | Conflict | The request could not be processed at this time. |
410 | Gone | The resource is no longer available and the redirect address is unknown. |
411 | Length Required | The length of the request is not specified. |
412 | Precondition Failed | The precondition sent by the request is not checked. |
413 | Request Entity Too Large | The requirement is too high. |
414 | Request-URI Too Long | URI is too long. |
415 | Unsupported Media Type | The query format is not supported for a certain method and resource. |
416 | Requested range unsatisfiable | The “scope” query header fields are incorrect. |
417 | Expectation failed | The behavior that is expected and defined in the header of the request is not satisfied. |
418 | I’m a teapot | “I am a teapot”: This code is defined in RFC 232410 of April 1, 1998, Hyper Text Coffee Pot Control Protocol. It’s a webmaster joke, intended to send a bug back to anyone who wants to remotely control a coffee pot, telling them they misplaced a teapot |
421 | Bad mapping / Misdirected Request | The request was sent to a server that was not able to generate a response (e.g. because the connection was reused). |
422 | Unprocessable entity | Entity provided with an incomprehensible or incomplete request. (WebDAV) |
423 | Locked | The operation cannot take place because the resource is locked. (WebDAV) |
424 | Method failure | A method in the transaction failed. (WebDAV) |
425 | Too Early | The server cannot process the request because it can be replayed. |
426 | Upgrade Required | The client should change the protocol e.g. to TLS/1.0. |
428 | Precondition Required | Requirements must be conditional. |
429 | Too Many Requests | The client made too many requests within a certain time frame. |
431 | Request Header Fields Too Large | The HTTP headers sent exceed the maximum size allowed by the server. |
449 | Retry With | Code defined by Microsoft. The request must be returned after performing an action. |
450 | Blocked by Windows Parental Controls | Microsoft Code. This error occurs when Windows Parental Controls is enabled and blocks access to the page. |
451 | Unavailable For Legal Reasons | This error code indicates that the requested resource is not accessible for legal reasons. |
456 | Unrecoverable Error | Unrecoverable error. (WebDAV) |
Codes starting with 5 (Server Error):
Code | Message | Meaning |
---|---|---|
500 | Internal Server Error |
Internal server error. |
501 | Not Implemented | The requested function is not supported by the server. |
502 | Bad Gateway ou Proxy Error | By acting as a proxy or gateway server, the server receives an invalid response from the remote server. |
503 | Service Unavailable | The service is temporarily unavailable or under maintenance. |
504 | Gateway Time-out | Response timeout from server to intermediate server. |
505 | HTTP Version not supported | The HTTP version is not supported by the server. |
506 | Variant Also Negotiates | Negotiation error. |
507 | Insufficient storage | Not enough space to edit properties or build collections. (WebDAV) |
508 | Loop detected | Loop in a resource link. (WebDAV) |
509 | Bandwidth Limit Exceeded | Used by many servers to indicate over limit. |
510 | Not extended | The request does not respect the extended HTTP resource access policy. |
511 | Network authentication required | The client must authenticate to access the network. Used by fixed gateways to redirect clients to the authentication page. |
Also, if you have any questions, please comment below. You can also see more mistakes to avoid when designing a website here.