HTTP Status Codes Guide
Posted: Mon Dec 09, 2024 8:06 am
We all spend a part of our daily lives using the internet. Sometimes we use the internet to learn about a subject, sometimes to research a product, and sometimes to buy a product. After searching on Google or when we want to go to another page while browsing any website, we sometimes see that the page does not open. We usually see some three-digit error codes on the screen, such as 404 and sometimes 500. So what do these mean? In fact, when we reach the pages without any problems, similar status codes occur in the background that we do not see. In this blog post, we have discussed these status codes, namely HTTP status codes. I wish you a pleasant reading.
- What are HTTP Status Codes?
When users want to visit a website, a two-way communication occurs. The browser is on one side of this communication, while the server is on the other. This communication begins with the user wanting to access a web page. The user who accesses a web page actually sends a request to the server where the relevant web page is located through the employment database browser to display the page. The server responds to this request with a three-digit status code. The three-digit responses that the server gives to the browser are called HTTP status codes. While the relevant status codes sometimes indicate an error, sometimes they can indicate that the page opened without any problems. Therefore, it is not correct to always evaluate HTTP status codes as errors.
Why Are HTTP Status Codes Important?
HTTP status codes are a very important element for both users and websites. When users experience a problem with the web pages they want to access, they want to know where and why this problem is caused. Therefore, HTTP status codes are very important for users. Similarly, when we look at the event from the website's perspective, websites whose pages do not open due to certain problems or issues can have negative effects on both user experience and SEO performance. Therefore, which response codes are sent from the server to the users are very important in terms of understanding the source of the problem and resolving it.
- HTTP Status Code Classes
1xx : These are status codes that indicate that the request sent by the browser has reached the server and the process has started.
2xx : These are status codes indicating that the request sent by the browser has reached the server, been understood and is successful.
3xx : These are status codes indicating that the resource being accessed has been moved to another resource and a redirect is in progress.
4xx : These are status codes indicating that the request could not be fulfilled or the relevant web page or website could not be reached.
5xx : Status codes indicating that the request sent by the browser successfully reached the server, but the request could not be fulfilled due to problems on the server side.
- Most Common Status Codes
The status codes that emerge as a result of communication between the browser and the server vary in terms of their meanings. Let's examine the most common status codes that have the greatest impact on websites.
Status Code 200 (Successful)
In its shortest definition, it is the ideal status code. If a web page opens without any problems, a 200 status code is sent from the server to the browser. If a 200 status code is sent from the server to the browser, we can say that everything is as it should be for the visitor and the website.
301 Status Code (Permanent Redirect)
It is a status code that permanently redirects a web page to another web page and automatically redirects the user who visits the page. When the redirected pages are very similar or related in terms of content using the 301 status code, power loss can be minimized. For this reason, it is one of the most important status codes recommended for use in processes such as website transfers.
302 Status Code (Temporary Redirect)
It is a status code that indicates that a web page is temporarily redirected to another web page. The difference from the 301 redirect code is that it is used in cases where the page in question is in the testing phase, is under maintenance, or when the product in question is temporarily out of stock for an e-commerce site, and the page will be reactivated. However, users will not understand the difference between a 301 redirect and a 302 redirect. Users who enter the relevant page will be redirected directly to the other page.
403 Status Code (Access Permission Problem)
It is the status code that indicates that the user does not have permission to access the relevant web page or that the relevant web page is prohibited in response to the request sent to the server by the user to access a web page.
404 Status Code (Not Found)
This is the status code that indicates that the web page the user wants to view is not available on the relevant server. The relevant web page may have been deleted or its URL may have been changed. However, 404 status codes do not give an idea about whether the relevant page is temporarily or permanently unreachable. When users encounter a 404 status code on a web page they want to access, they generally leave the site and head to different websites. This will negatively affect the relevant website, especially if it is a page that receives a lot of traffic or whose URL is known by users. Therefore, it is recommended that pages with a 404 status code be redirected if there are relevant equivalents.
However, if the relevant web page will be active again after a while or if the relevant product will be back in stock for an e-commerce site, it would be more appropriate for the relevant page to remain with a 404 status code. We should try to keep users on the web pages that are left as 404 by redirecting them to different pages and not losing them. Therefore, with specially designed custom 404 pages, we can help users to head to different pages instead of leaving the website.
Status Code 410 (Permanently Unavailable)
It is a status code that indicates that the web page the user wants to access is not available on the server. It differs from the 404 status code in that it indicates that the relevant web page has been deleted permanently and will not come back. In addition, when search engine bots encounter web pages with a 410 status code, search engines can remove the relevant page from the index faster. For this reason, it is one of the status codes that should be taken into consideration when using it.
500 Status Code (Server Error)
This is the status code encountered in server-based problems. It indicates that something is wrong with the server. For websites with a 500 status code, the relevant server problem should be resolved as soon as possible. Because search engines will not want to present websites that users or search engine bots cannot access.
Status Code 503 (Server Unavailable)
This is a status code that indicates a temporary problem on the server side. It is usually encountered when servers are under maintenance or temporarily disabled due to overload. For example, when university exam results are announced, the ÖSYM site or the relevant website can be temporarily unavailable during a major sale. In addition, in cases of attacks on bandwidth by malicious people, the server will be temporarily disabled and users will encounter a 503 status code when they try to access the relevant website.
- What are HTTP Status Codes?
When users want to visit a website, a two-way communication occurs. The browser is on one side of this communication, while the server is on the other. This communication begins with the user wanting to access a web page. The user who accesses a web page actually sends a request to the server where the relevant web page is located through the employment database browser to display the page. The server responds to this request with a three-digit status code. The three-digit responses that the server gives to the browser are called HTTP status codes. While the relevant status codes sometimes indicate an error, sometimes they can indicate that the page opened without any problems. Therefore, it is not correct to always evaluate HTTP status codes as errors.
Why Are HTTP Status Codes Important?
HTTP status codes are a very important element for both users and websites. When users experience a problem with the web pages they want to access, they want to know where and why this problem is caused. Therefore, HTTP status codes are very important for users. Similarly, when we look at the event from the website's perspective, websites whose pages do not open due to certain problems or issues can have negative effects on both user experience and SEO performance. Therefore, which response codes are sent from the server to the users are very important in terms of understanding the source of the problem and resolving it.
- HTTP Status Code Classes
1xx : These are status codes that indicate that the request sent by the browser has reached the server and the process has started.
2xx : These are status codes indicating that the request sent by the browser has reached the server, been understood and is successful.
3xx : These are status codes indicating that the resource being accessed has been moved to another resource and a redirect is in progress.
4xx : These are status codes indicating that the request could not be fulfilled or the relevant web page or website could not be reached.
5xx : Status codes indicating that the request sent by the browser successfully reached the server, but the request could not be fulfilled due to problems on the server side.
- Most Common Status Codes
The status codes that emerge as a result of communication between the browser and the server vary in terms of their meanings. Let's examine the most common status codes that have the greatest impact on websites.
Status Code 200 (Successful)
In its shortest definition, it is the ideal status code. If a web page opens without any problems, a 200 status code is sent from the server to the browser. If a 200 status code is sent from the server to the browser, we can say that everything is as it should be for the visitor and the website.
301 Status Code (Permanent Redirect)
It is a status code that permanently redirects a web page to another web page and automatically redirects the user who visits the page. When the redirected pages are very similar or related in terms of content using the 301 status code, power loss can be minimized. For this reason, it is one of the most important status codes recommended for use in processes such as website transfers.
302 Status Code (Temporary Redirect)
It is a status code that indicates that a web page is temporarily redirected to another web page. The difference from the 301 redirect code is that it is used in cases where the page in question is in the testing phase, is under maintenance, or when the product in question is temporarily out of stock for an e-commerce site, and the page will be reactivated. However, users will not understand the difference between a 301 redirect and a 302 redirect. Users who enter the relevant page will be redirected directly to the other page.
403 Status Code (Access Permission Problem)
It is the status code that indicates that the user does not have permission to access the relevant web page or that the relevant web page is prohibited in response to the request sent to the server by the user to access a web page.
404 Status Code (Not Found)
This is the status code that indicates that the web page the user wants to view is not available on the relevant server. The relevant web page may have been deleted or its URL may have been changed. However, 404 status codes do not give an idea about whether the relevant page is temporarily or permanently unreachable. When users encounter a 404 status code on a web page they want to access, they generally leave the site and head to different websites. This will negatively affect the relevant website, especially if it is a page that receives a lot of traffic or whose URL is known by users. Therefore, it is recommended that pages with a 404 status code be redirected if there are relevant equivalents.
However, if the relevant web page will be active again after a while or if the relevant product will be back in stock for an e-commerce site, it would be more appropriate for the relevant page to remain with a 404 status code. We should try to keep users on the web pages that are left as 404 by redirecting them to different pages and not losing them. Therefore, with specially designed custom 404 pages, we can help users to head to different pages instead of leaving the website.
Status Code 410 (Permanently Unavailable)
It is a status code that indicates that the web page the user wants to access is not available on the server. It differs from the 404 status code in that it indicates that the relevant web page has been deleted permanently and will not come back. In addition, when search engine bots encounter web pages with a 410 status code, search engines can remove the relevant page from the index faster. For this reason, it is one of the status codes that should be taken into consideration when using it.
500 Status Code (Server Error)
This is the status code encountered in server-based problems. It indicates that something is wrong with the server. For websites with a 500 status code, the relevant server problem should be resolved as soon as possible. Because search engines will not want to present websites that users or search engine bots cannot access.
Status Code 503 (Server Unavailable)
This is a status code that indicates a temporary problem on the server side. It is usually encountered when servers are under maintenance or temporarily disabled due to overload. For example, when university exam results are announced, the ÖSYM site or the relevant website can be temporarily unavailable during a major sale. In addition, in cases of attacks on bandwidth by malicious people, the server will be temporarily disabled and users will encounter a 503 status code when they try to access the relevant website.