Bismillah
Selama ini kita audit blog selalu jumpa kan Server Response 404 Not Found, 400 Bad Request, 429 Too Many Requests dan banyak lagi. Kalau biasa buat audit kat Google Serach Console dan buang brokenlink memang selalu jumpa kod server ni.
Korang tahu tak apa maksud setiap kod respon tu? Aku pun tak tahu juga haha. Tetapi aku cuba untuk belajar dan memahaminya. Oleh itu, aku senaraikan HTTP response status code beserta maksudnya.
HTTP response status codes indicate whether a specific HTTP request has been successfully completed. Responses are grouped in five classes:
1. Informational responses (100 – 199)
- 100 Continue
- 101 Switching Protocols
- 102 Processing (WebDAV)
- 103 Early Hints
This status code is primarily intended to be used with the Link header, letting the user agent start preloading resources while the server prepares a response.
2. Successful responses (200 – 299)
- 200 OK
- GET: The resource has been fetched and transmitted in the message body.
- HEAD: The representation headers are included in the response without any message body.
- PUT or POST: The resource describing the result of the action is transmitted in the message body.
- TRACE: The message body contains the request message as received by the server.
- 201 Created
- 202 Accepted
- 203 Non-Authoritative Information
- 204 No Content
- 205 Reset Content
- 206 Partial Content
- 207 Multi-Status (WebDAV)
- 208 Already Reported (WebDAV)
- 226 IM Used (HTTP Delta encoding)
3. Redirection messages (300 – 399)
- 300 Multiple Choices
- 301 Moved Permanently
- 302 Found
- 303 See Other
- 304 Not Modified
- 305 Use Proxy Deprecated
- 306 unused
- 307 Temporary Redirect
- 308 Permanent Redirect
4. Client error responses (400 – 499)
- 400 Bad Request
- 401 Unauthorized
- 402 Payment Required Experimental
- 403 Forbidden
- 404 Not Found
- 405 Method Not Allowed
- 406 Not Acceptable
- 407 Proxy Authentication Required
- 408 Request Timeout
- 409 Conflict
- 410 Gone
- 411 Length Required
- 412 Precondition Failed
- 413 Payload Too Large
- 414 URI Too Long
- 415 Unsupported Media Type
- 416 Range Not Satisfiable
- 417 Expectation Failed
- 418 I'm a teapot
- 421 Misdirected Request
- 422 Unprocessable Entity (WebDAV)
- 423 Locked (WebDAV)
- 424 Failed Dependency (WebDAV)
- 425 Too Early Experimental
- 426 Upgrade Required
- 428 Precondition Required
- 429 Too Many Requests
- 431 Request Header Fields Too Large
- 451 Unavailable For Legal Reasons
5. Server error responses (500 – 599)
- 500 Internal Server Error
The server has encountered a situation it does not know how to handle.
- 501 Not Implemented
The request method is not supported by the server and cannot be handled. The only methods that servers are required to support (and therefore that must not return this code) are GET and HEAD.
- 502 Bad Gateway
This error response means that the server, while working as a gateway to get a response needed to handle the request, got an invalid response.
- 503 Service Unavailable
The server is not ready to handle the request. Common causes are a server that is down for maintenance or that is overloaded. Note that together with this response, a user-friendly page explaining the problem should be sent. This response should be used for temporary conditions and the Retry-After HTTP header should, if possible, contain the estimated time before the recovery of the service. The webmaster must also take care about the caching-related headers that are sent along with this response, as these temporary condition responses should usually not be cached.
- 504 Gateway Timeout
This error response is given when the server is acting as a gateway and cannot get a response in time.
- 505 HTTP Version Not Supported
The HTTP version used in the request is not supported by the server.
- 506 Variant Also Negotiates
The server has an internal configuration error: the chosen variant resource is configured to engage in transparent content negotiation itself, and is therefore not a proper end point in the negotiation process.
- 507 Insufficient Storage (WebDAV)
The method could not be performed on the resource because the server is unable to store the representation needed to successfully complete the request.
- 508 Loop Detected (WebDAV)
The server detected an infinite loop while processing the request.
- 510 Not Extended
Further extensions to the request are required for the server to fulfill it.
- 511 Network Authentication Required
Indicates that the client needs to authenticate to gain network access.
Credits to https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#information_responses
Korang boleh semak brokenlinks checker kat google. Ada banyak jenis website untuk semak broken link korang boleh guna.
Aku buat entri ini sebagai rujukan sahaja.
Ada dpt juga dlm email ni
BalasPadamTerima kasih kerana singgah ke Blog Sii Nurul. Jika ada sebarang pertanyaan, komen, penambahbaikan, cadangan mahupun pandangan. Boleh tinggalkan jejak anda.