What Are HTTP Status Codes?
An HTTP Status Code can be defined as a message that is sent by the server when a request made by the browser is or isn't fulfilled. Status codes are included in the HTTP response when a URL is requested by a web browser and that particular status code provides the information about the URL which has been requested.
Some Common HTTP Status Codes
There are a lot of HTTP Status Codes but in this article, we're going to cover some of the most common ones which you can encounter while developing.
200 - OK -
The 200 Status Code means Ok. It is sent when the request is successfully received, understood, and accepted. It means that the server has sent the requested content to the client.
301 - Permanent Redirect -
The 301 Status Code means there has been a Permanent Redirection. It is sent when the requested URL has been permanently sent to a new location. It generally happens if a website changes its Domain Name or URL. If one moves to a new page without a 301 redirect it can cause a huge downfall in the traffic level of the website as the search engine would interpret the move as a new page without any ranking.
302 - Temporary Redirect -
The 302 Status Code means there has been a Temporary Redirection. It is different from the 301 Status Code because it keeps the SEO Value of the old URL and applies it to the new URL when the redirect is removed.
404 - Not Found -
The Status Code 404 means the Web Page you've been looking for was Not Found. It is sent when the requested URL isn't found. This might occur if the page has been deleted or the URL has been altered without a redirect.
500 - Internal Server Error -
The Status Code 500 means there is some error at the internal server. It is sent when the server faces an error and cannot process the request. This can happen due to several reasons such as bugs in the code or the server might be overloaded.
I hope that you must have found this article quite helpful. If yes, then do give a read to some of my other articles!
Who knows you might become a great programmer ๐ค!