Yandex

HTTP Error Codes

Print
  • http, errors, ошибки
  • 1

Do you know the annoying moments when a website gives http error codes? Most Internet users have asked questions about the causes and ways to fix these problems

Before looking at the problem broadly, let's introduce important definitions. A client is software or hardware that communicates with the Internet and requests certain data from a server. Server is a computer that stores data, performs service functions for other computers on the network, and receives and responds to client requests.

 

HTTP Status Codes

The http request error code is the part of the web server response header to a client request that informs about the result and indicates what action the client should take. The response code is followed by a phrase in English that explains the problem.

HTTP status codes come in five categories:

  • Class 1 - temporary information codes (1XX). They indicate that the request has been accepted and is being processed.
  • Class 2 - successful processing of the request (2XX). For example, this is not a 200 http error because the request was successfully completed.
  • Class 3 - redirect (3XX). Indicates the need to redirect from one address to another (e.g., http errors 300, 301, 302, 304).
  • Class 4 - client-side error (4XX). For example, a 404 error indicates that the requested page was not found, while a 403 error indicates that access to the page was denied.
  • Class 5 - (5XX) server-side error.

 

4xx - Client-side errors

Request errors http 4XX is responsible for problems that occur on the client side, i.e. the site visitor. Most of such server responses are caused by webmaster's mistakes: incorrect URl specification, errors in HTTP server configuration, etc.

Server error code Explanation
400 - Bad Request http 400 what is this error? The server cannot process the request due to a client problem. For example, a file that is too large, invalid syntax, invalid URL. Therefore, the http error code 400 is sometimes used as a generic for all error statuses, even if the problem occurs on the server side.
401 - Unauthorized http error 401 what is the error? The request does not contain suitable authentication credentials, authentication failed. In cases where you want to inform the client that access is completely denied, an http error 403 should be issued.
402 - Payment Requested The request cannot be executed until the client makes payment. Currently very rarely used in web development.
403 - Prohibited The request has been understood, but the server denies authorization, so the client cannot access it. Unlike status 401, which requires authentication, status 403 says that the client is not authorized to access.
404 - Not found The http 404 error indicates that the server is not ready to provide access to the resource. If the pages are gone for good, it is recommended to use status code 410.
405 - Method not allowed 405 http error says that the server does not support the specific resource that was requested by the client.
406 - Unacceptable http 406 error like status 405 indicates that there is no support for a particular request. But unlike the previous error, 406 indicates that the server has understood the request, but the response cannot be accepted by the client.
407 - Proxy authentication required This code, which is similar to code 401, reflects the need to pre-authorize the user through a proxy server.
408 - Timeout Request The server did not receive a request from the client within the specified time frame. This may be caused by an unstable or interrupted connection.
409 - Conflict The request was correct, but there was a problem on the server side. An example of http 409 error may be an attempt to edit a file by a user when these operations are not allowed.
410 - Gone The requested resource is no longer available on the server and this state is most likely permanent. If you are not sure if this state is persistent, it is recommended to use the 404 code.
411 - Length required There is no predefined request body length. The client can repeat the request by specifying the correct request body length.
412 - Prerequisites not fulfilled Requests with conditions are one of the features of the HTTP protocol. A status indicates that one or more conditions in the request header have not been met. For example, this can happen in the case of a conditional GET request, where a resource should only be re-enabled if it has been changed.
413 - Request body too large This error occurs when the size of the request body (or transferred file) exceeds the restriction set on the server.
414 - URI is too long A client request contains a URL that exceeds the allowed length. Restrictions are set by browsers and search engines for security purposes and to prevent DDoS attacks or code errors. However, the HTTP protocol itself does not set explicit restrictions, and if the URL exceeds the allowed length, the server returns an error.
415 - Unsupported media type 415 http error means that the server cannot process the body or part of the request body because of an unknown multimedia format.
This error code is analogous to status code 406, but unlike it 415 error is related to unsupported multimedia format.
416 - Range not satisfied A Range header field was present in the request, but none of the specified values corresponded to the size of the requested resource, and no If-Range header field was specified. This is especially true for byte range requests where the first byte in the range specification was larger than the actual size of the resource.
417 - Expectation not met The server cannot process the "Expect" field contained in the request. It is also possible that when accessing the server through a proxy server, the waiting time has expired, which also causes error 417. Compared to error 408, the use of a proxy server is explicitly indicated.
418 - 420 - I'm a teapot Error 418 http was originally created as a April Fool's joke, sometimes used as a humorous element, but not really intended for real everyday purposes. It has not received official status and, as a consequence, most browsers ignore it.
421 - Misdirected Request The request is passed to a server that cannot process it correctly. This usually happens when an incorrect IP address is specified in DNS. This error can also occur on sites with one SSL certificate for different domains.
422 - Unprocessed 422 an http error occurs when a received request is successfully delivered to the server and processed, but a logical error is detected in the content of the XML document that prevents the required operation from being performed within the WebDAV protocol.
This can happen, for example, when transmitting data that does not conform to the expected format or contains errors.
423 - Blocked Access to the specified platform is not authorized for the current user or their account. This may be due to missing or expired credentials, incorrect credentials, or restrictions set by the system administrator.
424 - Failed Addiction Execution of the current request depends on the successful execution of another process. If the dependent operation fails to execute, it may cause the current request to fail and the server returns this code.
425 - Too soon The client HTTP request occurs on the HTTPS protocol. It can take a significant amount of time to establish a connection between the client and the server. This creates a vulnerability by forcing the server to send a retry request to the client until the secure connection is fully established.
426 - Update required You need to use a new protocol to send requests to the server. This error occurs when the client continues to use an outdated version of the HTTP protocol while the server requires a more up-to-date version.
428 - Prerequisite required The code is designed to prevent conflicting versions of a GET-PUT resource, where a client receives the state of a resource, changes it, and sends it back to the server while a third party changes the state on the server, resulting in a conflict.
429 - Too many requests 429 http error will be sent if a client makes too many requests in a short period of time.
431 - Header request is too large The server cannot process the request because the header fields are too large.
444 - No response Used to indicate in Nginx server log files situations where the server closed the connection without passing information back to the user. It is mainly used in the context of malware protection.
499 - Closed client request http 499 error is generated when a client terminates a connection while the server is processing a request. As a result, the server cannot send back the http header.
450 - Blocked by Windows Parental Control Windows parental control settings define blocking access to individual pages. This is used when parents apply parental controls and a user requests access to a blocked resource.
451 - Unavailable for legal reasons The server refuses to serve requested content: government censorship to certain content has been established, when copyright infringement occurs, and when content that contravenes laws or court orders.

 

5xx - Server Error Codes http 500

5XX http error statuses are usually related to webmaster or administrator actions. Changes made to a directory or server configuration can cause a site to not function properly. For example, incorrectly configured permissions can cause an error.

http status, code Description
500 - Internal server error What is http error 500? It appears when an unforeseen condition has occurred on the server that prevents the successful execution of a request. It can be internal software failures, database problems, resource restrictions and other factors.
501 - Method not supported The server does not have the capability to fulfill the request, nor does it recognize or support the method specified in the request.
502 - Gateway Error When an http 502 error occurs, the server acting as a proxy or gateway has received an invalid response from the next server in the request chain. This can happen for several reasons, such as the server being unavailable, responding with an error, or being too slow.
503 - Service unavailable http 503 what is the error - service unavailable? The server cannot fulfill the client's request. It may be overloaded or disabled.
504 - The gateway transit time has expired This error occurs when a server, acting as a proxy or gateway, cannot receive a response in time from the server it has contacted.
505 - HTTP version not supported The server refuses to support the HTTP protocol version that was specified in the client request. In particular, the client has sent a request using a new protocol version that the server does not recognize and cannot process.
507 - Not enough space The server does not have enough disk space to perform the required operation. For example, the server is running many applications or storing a large amount of data, the server is not configured to account for disk space, etc.
510 - No extension The server cannot process the client request due to lack of support for the requested extension.
The server may be running an outdated or incompatible version of software that does not support the requested extension; not configured to handle a specific type of extension; insufficient resources to execute it.

 

How to check page status code

Let's start with the manual method. Open the site in Chrome browser and press the "F12" key (if you have a laptop, you may have to press "Fn + F12"). You can also open the developer tools using the keyboard shortcut "Ctrl + Shift + I". Switch to the "Network" tab and press "Ctrl + R" to get the page code. You will see the status codes in the "Status" column. There are also special plugins and services available.

Bertal

Free service for viewing http headers, web files, html codes of pages. Compatible with all protocols: HTTP, HTTPS, FTP.

Information is requested using HEAD, GET, POST methods. HEAD method is used to get only the header. GET method is used to get both header and body. The POST method works similarly to the GET method, but additionally contains a filled POST string.

Supports search robots such as YandexBot, GoogleBot, BingBot, Yahoo, Baiduspider - you can analyze their actions and get the information you need.
The service is fully compatible with all popular browsers, works with Proxy.

PR-CY

Service of SEO-audit of the site, monitoring and control of positions in search engine results. Ideal for analyzing server response codes.

Analyzes in detail all page elements such as texts, scripts, videos and photos. Supports various request methods including GET, POST and HEAD.
Works with Google and Yandex.

There is a free plan for express website analysis. However, for a full audit, it is recommended to purchase a subscription.

Checkmy

A powerful free tool that provides a detailed check of server response codes and headers. It also checks URL availability, content compression, page caching, code validity, server type and correct redirects.

It also works with Cyrillic domains, has a mobile version of the tool, checks pages with multiple redirects, displays page load size and speed, etc. Purchasing a paid subscription expands the functionality.

Yandex.Webmaster

Free provides valuable insights into how the robot itself sees your site, allowing you to optimize it for search engine requirements.

Converseo

A feature-rich free tool that is ideal for checking a single URL or conducting mass tracking. Various methods are available, including GET, POST and HEAD, which allows for deeper analysis of the required information.

Coolakov

Works similarly to Converseo, but has additional features: the ability to bulk check URLs. Provides the final server response, including information about a redirect to a working page or an error if the page fails. Thus, you get complete information about the status of each URL.

Plugins

All plugins provide valuable information and will help you in optimizing your website. Their use is completely free of charge.

  • Redirect Path Link
  • Robots Exclusion Checker
  • SEO META in 1 CLICK
  • Website SEO Checker: Free Audit & Analysis.

 

How to fix HTTP error

It is important to update the web browser after making software changes.
Analyzing server logs is an important step to understand request processing. Web servers such as Apache and Nginx provide access.log and error.log files that contain useful information. Careful examination of these files can help identify and fix problems. It is worth noting that HTTP error codes are a standard part of the protocol. They are generated by the application server processing client requests and reflect a specific error. Thus, the server response code depends on how the software handles this error.

Let's consider eliminating the most common http errors when accessing the server, which can occur both on the client and server side.

Error http when accessing the server Reason Recommendations - what to do
400 Lots of cookies and cached data. Clear web browser cache and delete cookies.
  Browser malfunctions. Update the web browser you are using to the latest version or switch to a different browser.
  Invalid HTTP request. Check the syntax and query parameters to rule out possible errors.
401 The client is attempting to access a restricted resource that is guarded by the HTTP authorization system. The error occurs until the client provides the correct credentials, including login and password. To do this, enter the appropriate information in the .htpasswd file.
403 No permissions to read the requested file. Expand access rights.
  Using the .htaccess file to restrict access to certain IP addresses and resources. Check and configure the .htaccess file.
  The client is trying to open a directory that does not have an index file and content mapping is disabled. Activate the function of displaying the contents of the catalog in the server settings.
404 This can be due to several reasons, but it's important to understand what actions you can take to solve the problem. Check the correct spelling of the link or URL you entered into your browser.
The requested file may have been moved, deleted, or renamed on the server. Check the server configuration and make sure the root directory is correct. Make sure you have permissions to open the directory where the requested file is located.
Check if the server supports symbolic links.
500 Incorrect folder and file permissions or incorrect instructions in the .htaccess file. Check file and folder permissions settings, make sure .htaccess is correct, and avoid using unsupported directives.
502 Reverse proxy server problems. Check the status and configuration of the backend server.
Check the network connection setup between the backend servers and the reverse proxy server.
Verify that there is no firewall blocking.
Check socket permissions and make sure they are correctly located.
503 Scripts hang when transferring large files. Check the components and plugins of your CMS, disabling them one by one and identifying the most heavy or damaged ones that slow down site loading. Refuse such components or find faster analogs.
Check for slow requests in the mysql-slow.log file.
Ensure that PHP scripts use local paths and not URLs like "http://...".
  Large number of requests to the server - can be caused by several reasons:
- Split or links to too many files (images, stylesheets, JS scripts) that are loaded through separate requests.
- DDoS attacks, flooding and spam comments.
Combine resources into a single file where possible.
In the event of a DDoS attack, it is important to identify the type of attack and take appropriate measures to address it.
504 The Internet connection between the gateway and the primary server is weak. This may be due to problems with the ISP or network infrastructure. Check the Internet connection and make sure it is stable. If there are connection problems, contact your Internet provider.
  Gateway server overload due to high traffic and insufficient resources. Optimize code to improve performance or add additional resources on the server.
  The server settings may specify too short a time interval to wait for a response from the mediator server. Increase its time in the mediation server settings.

 

Conclusion

Even the best sites sometimes have problems and errors. If you want to deal with such an HTTP error yourself, you need to understand the source of its occurrence. New knowledge will help you save not only time, but also resources, as you won't have to ask for help from your provider's technical support.

Was this answer helpful?

Back
spinner