Status code
- For developers it is important to understand the meaning of HTTP status codes when developing web applications that act as service APIs. Returning the status code correctly makes it possible for the client to determine exactly what subsequent processing steps to follow.
- For SEOers , mastering the meaning of http status codes will help analyze / audit website status. Handling cases encountered in the process of SEO optimization ...
What Is HTTP Status Code
HTTP Status Code is a 3-digit code sent back to the client from the server used to describe the status of the server process that processes a given request from the client to the server under the HTTP protocol.
Note that the only effect of HTTP status code is to provide information about the status of the server's request processing.
Meaning Of Common HTTP Status Codes
HTTP status codes have 3 digits and are classified into 5 main categories based on the first digit:
- 1xx: Status codes of this type are used to simply notify the client that the server has received the request. 1xx status codes are rarely used and not even defined in HTTP version 1.0.
- 2xx: Status codes of this type mean that requests are received, understood and processed by the server successfully.
- 3xx: Status code of this type means that the server will forward the current request to another request and the client needs to make the next request to be able to complete. Normally when the browser receives a status code of this type, it will automatically send the next request to get the result.
- 4xx: Status codes of this type mean that there was an error on the client's side while sending the request. For example, the wrong URL, the wrong HTTP method, no access to the page ...
- 5xx: These status codes mean that the server has an error on the server side while processing the request. For example, the databse is dead or the server is out of memory ...
Common Code Status
In this section, we will discuss the status code or use when building web services (or using API).
2xx: Success
Of the 2xx HTTP status codes, 200 OK is the most commonly used status code. Requests successfully processed by the server typically use a status of 200.
3xx: Forward
Of the 3xx HTTP status codes, 301 Moved Permanently, 302 Found and 307 Temporary Redirect are often used. While 302 and 307 are used for requests where transitions are meant to be temporary, 301 is used for requests where the forwarding is fixed. The difference is that with requests that return 301, the client should not send this request in the next sessions, but should use a new request (or a forwarded request).
Whereas with requests that return 302 and 307, the client should still use this request instead of the new request (the request is forwarded) because the transfer is only temporary.
Whereas with requests that return 302 and 307, the client should still use this request instead of the new request (the request is forwarded) because the transfer is only temporary.
4xx: Client Error
Of the 4xx HTTP status codes, 400 Bad Request, 401 Unauthorized, 403 Forbidden and 404 Not Found are status codes that are commonly used. Inside:
- 400 means that the server has received the request but the client has sent an error request. Some of the errors can be mentioned as syntax errors such as uploading the file in the wrong format or too large, or missing necessary data ...
- 401 means that the server has received the request but the client does not have access to view or edit or delete the request. The request returned status code 401 will change if the client made login.
- 403 means that the server has received the request but refuses to process the request. A common case that the status code 403 returns is that for requests that want to retrieve a list of files in a directory on the server, for example, the request to
- 404 means that the server has received the request but cannot find any content returned with the received URL.
5xx: Server Error
Among HTTP status codes of the 5xx category, 500 Internal Server Error is a commonly used status code. The status code 500 is a status with a general meaning that the server encountered an error while processing the request without giving a specific reason.
- If you meet core 500 much need to seriously check the status of the server! Avoid affecting business. You can refer to Good Host Selection to avoid the 5XX error
Page 404is a common error when broken links occur, lost links, broken links, ... maybe because the article was deleted. So when deleting an article, create redirects301, 302... to an address you find appropriate ....
And…
And…
Error 404- Image towards SEO very seriously!
Every website must have a 404 Page, just in case! Experience designing 404 pages so cute to relieve stress for users who are looking for content that has not been reached! Should add elements such as Menu, Search alternative content ... ..
404 PAGE of IKEA
Be creative 01 page 404 cute ^^
Post a Comment
Post a Comment