/

October 11, 2023

HTTP status code analysis: 3 steps to quickly troubleshoot errors and problems!

HTTP status codes

What are HTTP status codes?

HTTP status codes are three-digit codes sent back by a web server after a request is made by a client (such as a browser). They indicate the success of the request. Whether you're an engineer or a marketer, understanding HTTP status codes can help you quickly troubleshoot errors and improve website efficiency. Below, we'll provide a detailed explanation of HTTP status codes to help you gain a deeper understanding!

There are five categories of HTTP status codes:

  • 1xx: Information response(temporary status)
    Indicates that the server has received the request but has not yet completed processing it.
  • 2xx: Successful response(Request successful)
    Indicates that the request has been successfully processed by the server, such as the classic 200 OK.
  • 3xx: Redirect(Further action required)
    Notifies the client that additional action is required to complete the request.
  • 4xx: User-side error(Request a question)
    The request from the user side may be wrong, for example 404 Not Found.
  • 5xx: Server Error(Server problem)
    The server encountered an error while processing the request, such as 500 Internal Server Error

HTTP status codes and solutions

1xx: Information response (temporary status)

100 Continue

100 Continue

Although 1xx status codes are uncommon, they are usually used for processing large files or switching protocols, telling the client "the server has started processing, please wait."

1. 100 Continue

Cause:When the client sends a large file, the server asks for confirmation whether to continue uploading.

  • Troubleshooting steps:
    1. Confirm that the server is correctly implemented 100 Continue support.
    2. Check whether the client has sent the Expect: 100-continue header.
  • Workaround:
    1. Configuring support on the server 100 Continue mechanism.
    2. Test the interaction between the client and the server to ensure protocol compatibility.

2. 101 Switching Protocols

The server should be used for protocol switching, such as switching from HTTP to WebSocket.

  • Troubleshooting steps:
    1. Check whether the client is set up correctly Upgrade header.
    2. Verify that the server supports the requested new protocol (such as WebSocket).
  • Workaround:
    1. Make sure the server has the required protocol modules installed and enabled.
    2. Test that the upgrade process performed as expected.

102 Processing (WebDAV)

Used in the WebDAV protocol to handle complex requests (such as multi-step operations).

  • Troubleshooting steps:
    1. Make sure the server supports WebDAV and handles multi-step requests correctly.
    2. Tests whether the client handles delayed responses correctly.
  • Workaround:
    1. Optimized server performance to reduce processing time.
    2. Return before long operation 102 Processing, keeping the user side informed.

103 Early Hints

Indicates situations where you need to speed up page rendering, such as preloading CSS, JavaScript, or images.

  • Troubleshooting steps:
    1. Check if the server returns correctly Link Headers and resource paths.
    2. Confirm whether the client browser supports 103 Early Hints And preload.
  • Workaround:
    1. Configure on the server side 103 Early Hints and Link Header, specifying the resources that need to be preloaded.
    2. Use developer tools to check that resources are preloaded as expected, and optimize the order of resources as needed.

2xx: Success (request successful)

2xx: Success (request successful)

2xx: Success (request successful)

2xx is the most desirable status code because it means the request was successful and received the expected response.

201 Created

The request was successful, and the results vary depending on the HTTP method:

  • GET: The resource was retrieved successfully and passed in the message body.
  • HEAD: Contains headers only, no message body.
  • PUT/POST: The response contains detailed information about the operation results.
  • TRACE: The message body returns the request received by the server.

Troubleshooting steps:

  1. Make sure the server processes the request correctly and returns 200 OK.
  2. Verify that the client successfully parsed the server response.

Workaround:

  1. Make sure the server's response data matches the request method.
  2. Test various request methods to check whether they return expected results.

202 Accepted

Suitable for operations that require long processing time, such as batch processing or subsequent operations.

Troubleshooting steps:

  1. Check if the server has logged the request and arrange for subsequent processing.
  2. Determine whether the client expects asynchronous processing.

Workaround:

  1. Set up a notification mechanism to inform the user end of the processing completion status.
  2. Ensure that the server is able to track and complete subsequent request operations.

203 Non-Authoritative Information

When using a cache or mirror server.

Troubleshooting steps:

  1. Verify that the data source returned by the server is correct.
  2. Check if you need to update your cache or back up your data.

Workaround:

  1. Optimized server caching strategy to ensure timely data updates.
  2. Prioritize return where applicable 200 OK To indicate direct source.

204 No Content

The request succeeded, but no content was returned. For example, a delete operation succeeded but no content was returned.

Troubleshooting steps:

  1. Verify that the server handles the request correctly and does not return a body.
  2. Verify that the header information provides sufficient context.

Workaround:

  1. Optimize server logic to return when appropriate 204 No Content.
  2. Tests whether the client handles no-content responses correctly.

205 Reset Content

The server instructs the client to reset the current document or form. Resetting is required after a form has been cleared.

Troubleshooting steps:

  1. Verify that the server response triggers a reset operation on the client side.
  2. Ensure that the user side can perform reset behavior correctly.

Workaround:

  1. Configuration Server Returns 205 Reset Content, and record the user-side reset behavior.
  2. Test whether the client responds successfully.

206 Partial Content

The client requests a portion of a resource, and the server successfully returns the data within the specified range, such as audio or video streaming or segmented downloads of large files.

Troubleshooting steps:

  1. Check that the server correctly supports the Range header.
  2. Verify that the client correctly requests the resource scope.

Workaround:

  1. Enable range request support on the server to ensure data is segmented correctly.
  2. Use developer tools to test segmented downloading and playback of assets.

207 Multi-Status (WebDAV)

Used to transmit status information of multiple resources. In WebDAV operations, perform batch operations on multiple resources.

Troubleshooting steps:

  1. Checks if the server returned multiple status codes for the resource.
  2. Verify that the client handles multi-status responses correctly.

Workaround:

  1. Optimized server logic to correctly pass multi-state information.
  2. Tests the client's compatibility with multiple status responses.

208 Already Reported (WebDAV)

Avoids repeated listing of internal members in multiple bindings. Suitable for binding management in WebDAV scenarios.

Troubleshooting steps:

  1. Verify that the server is correctly listed to avoid duplicates.
  2. Verify that the user agent correctly interprets the reported status.

Workaround:

  1. Optimized WebDAV server to avoid redundant listing.
  2. Ensures consistent state responses across multiple bindings.

226 IM Used

The server applies one or more operations to a resource and returns the result. In the context of delta encoding, this is used to provide differential content.

Troubleshooting steps:

  1. Check that the server implements delta encoding correctly.
  2. Verify that the client supports and correctly interprets incremental responses.

Workaround:

  1. Configure the server to support incremental encoding to improve response efficiency.
  2. Test whether the user terminal handles incremental data correctly.

3xx: Redirect (further action required)

3xx: Redirect

When you need to redirect the user to another resource, the server will return a 3xx status code to allow the client to automatically jump to the new location.

 

300 Multiple Choices

This request has multiple possible responses. The server cannot choose the specific option on its own; the client must decide. For a website with multiple language versions, the server provides multiple options.

  • Troubleshooting steps:
    1. Check that links to all available resources are provided.
    2. Verify that the options in your response are complete and clear.
  • Workaround:
    1. Use HTML links to provide user choices.
    2. Improve automatic selection logic (e.g. based on region or language preference).

301 Moved Permanently

The URL of the requested resource has been permanently changed. The new URL is in Location Specified in the header. Website structure adjustment or permanent relocation of pages.

  • Troubleshooting steps:
    1. confirm Location The headers are correctly pointing to the new URL.
    2. Test that requests to the old URL return the correct 301 status code.
  • Workaround:
    1. Configure the server for permanent redirection.
    2. Update all links pointing to the old URL, both on and off the site.

302 Found

The URI of the requested resource has changed temporarily, but the user agent should continue to use the old URI. Temporary page redirection (such as an activity page).

  • Troubleshooting steps:
    1. Verify that the redirection logic is correct.
    2. Make sure the response Location The header points to a temporary URI.
  • Workaround:
    1. Use server configuration for temporary redirects.
    2. For future stability, consider setting a transition period.

303 See Other

The server instructs the client to fetch a resource at another URI using a GET request. Page redirection after form submission.

  • Troubleshooting steps:
    1. Make sure to redirect after form submission using a 303 status code.
    2. verify Location Whether the header's URI is valid.
  • Workaround:
    1. Configure the server to return the correct URI after the form is submitted.
    2. Test the browser's behavior after a redirect.

304 Not Modified

This status code is used for caching purposes, telling the client that its cached version is still valid. Version control of static resources (such as images and CSS files).

  • Troubleshooting steps:
    1. Verify that the request contains a valid If-Modified-Since or ETag header.
    2. Make sure the server handles cache checking logic correctly.
  • Workaround:
    1. Set the correct HTTP Cache-Control headers.
    2. Tests whether the browser caches resources correctly.

305 Use Proxy (deprecated)

This status code indicates that the requested resource must be accessed through a proxy, but has been deprecated by the HTTP standard due to security issues.

  • suggestion: Avoid using this status code and directly provide a secure proxy settings file.

306 unused

This status code is deprecated and remains only as a placeholder.

  • suggestion: No action is required. Just make sure the server does not return this status code.

307 Temporary Redirect

The server instructs the client to retrieve a resource from another URI using the same request method (e.g., POST). A temporary redirection preserves the request method (e.g., an intermediate page in a payment process).

  • Troubleshooting steps:
    1. Make sure the redirected URL is temporary.
    2. Tests whether the request method is preserved.
  • Workaround:
    1. Configure the server to return a 307 status code and the correct Location header.
    2. Test how different user agents behave with redirects.

308 Permanent Redirect

The resource is permanently moved to another URI, and the user client is required to retain the request method. Upgrade the long-term API interface.

  • Troubleshooting steps:
    1. Make sure the new URI is permanent.
    2. Tests whether the request method is correctly preserved.
  • Workaround:
    1. Set the server to return a 308 status code.
    2. Update all potentially affected client requests.

4xx: User-side error (request problem)

4xx: User-side error

There is a problem with the user's request, which may be an incorrect URL, lack of permission, or incorrect format.

 

400 Bad Request

The server was unable to process the request, typically due to malformed request syntax, invalid message framing, or deceptive routing. The client did not provide a properly formatted request.

  • Troubleshooting steps:
    1. Check that the request URL and headers are formatted correctly.
    2. Verify that the request body contains necessary parameters or data.
  • Workaround:
    1. Fix formatting errors in the request.
    2. Updated API documentation to ensure correct usage by users.

401 Unauthorized

The client is not authenticated and cannot access the requested resource. The client did not provide valid authentication credentials.

  • Troubleshooting steps:
    1. Verify that the request contains a valid authentication header (such as Authorization).
    2. Verify that the server's authentication mechanism is working properly.
  • Workaround:
    1. Provide the correct authentication credentials.
    2. Use HTTPS to ensure secure transmission of credentials.

403 Forbidden

The client does not have permission to access this resource, even though it is authenticated. The server has prohibited access to certain resources for known users.

  • Troubleshooting steps:
    1. Verify that the user has the necessary access permissions.
    2. Check the access control lists (ACLs) in the server configuration files.
  • Workaround:
    1. Update user access rights.
    2. Adjust the server's resource access policy.

404 Not Found

The server cannot find the requested resource. This is one of the most common HTTP status codes. The client requested a URL that does not exist.

  • Troubleshooting steps:
    1. Verify that the requested URL is correct.
    2. Make sure the resource is still available on the server and has not been deleted.
  • Workaround:
    1. Fix the incorrect URL.
    2. Set up appropriate redirects (such as 301 or 410) for deleted resources.

405 Method Not Allowed

The requested HTTP method is not supported by the target resource. For example, trying to use the DELETE method on a resource that does not support DELETE.

  • Troubleshooting steps:
    1. Confirm the HTTP methods supported by the server.
    2. Check the API documentation to learn about the available methods for a resource.
  • Workaround:
    1. Use a supported HTTP method instead.
    2. Updated API to support new methods.

406 Not Acceptable

The server cannot provide content that meets the user agent's criteria. The client requested an unsupported content type.

  • Troubleshooting steps:
    1. Verify the request header Accept Is it correct?
    2. Check whether the server supports the requested content format.
  • Workaround:
    1. Adjust the user side Accept header.
    2. Update the server to provide compatible content.

408 Request Timeout

The client did not complete the request within the server's wait time. The server closed the unused, idle connection.

  • Troubleshooting steps:
    1. Check the server's timeout settings.
    2. Check whether the network is normal.
  • Workaround:
    1. Increase the server timeout.
    2. Optimize request performance to reduce latency.

409 Conflict

The client's request conflicts with the server's current state. The resource you are attempting to update has already been modified by another user.

  • Troubleshooting steps:
    1. Verify that the resource's versioning is consistent.
    2. Verify that no other users are modifying the resource at the same time.
  • Workaround:
    1. Provide user-side options for resolving conflicts.
    2. Use a version control system to handle multi-user operations.

410 Gone

The resource has been permanently deleted and is inaccessible. The old page was deleted and has no replacement.

  • Troubleshooting steps:
    1. Confirm whether the resource has been permanently deleted.
    2. Verify that no other users are still accessing the resource.
  • Workaround:
    1. Update all links on the site to avoid pointing to deleted resources.
    2. Provide users with useful alternative content.

429 Too Many Requests

The client sent too many requests in a given timeframe. The API rate limit exceeded the server's configuration.

  • Troubleshooting steps:
    1. Check that the server is implementing rate limiting correctly.
    2. Check whether the request frequency of the user side exceeds the limit.
  • Workaround:
    1. Improve client request patterns to comply with rate limits.
    2. Return the appropriate Retry-After Header that indicates when the client can retry.

 

5xx: Server Error (Server Problem)

5xx: Server Error

A 5xx status code is returned when the server is unable to complete a request due to an internal problem. These errors typically require server administrator intervention. For example, a kitchen outage or the chef's departure could prevent the meal from being prepared. "Sorry, we were unable to prepare your meal."

500 Internal Server Error

The server encountered an unknown error and could not complete the request.

  • reason:
    1. Internal server code error.
    2. Unexpected situations (such as resource overload).
  • Troubleshooting steps:
    1. Check the server logs for specific error messages.
    2. Check whether there are any errors or unhandled exceptions in the backend program.
    3. Test the server's resource usage, such as whether the memory or hard disk is full.

501 Not Implemented

The server does not support the requested method and cannot perform it.

  • reason:
    1. The HTTP method used (such as DELETE or PATCH) is not enabled on the server.
  • Troubleshooting steps:
    1. Check if the server supports this method (at least GET and HEAD).
    2. Update the server configuration to enable the necessary methods.

502 Bad Gateway

The server, acting as a gateway, received an invalid response.

  • reason:
    1. The server's upstream service is not functioning properly.
    2. Network connection problem or communication failure between servers.
  • Troubleshooting steps:
    1. Verify that the upstream server is functioning properly.
    2. Test whether the connection between servers is normal.
    3. Verify the configuration of the reverse proxy or load balancer.

503 Service Unavailable

The server is temporarily unable to handle the request (maintenance or overloaded).

  • reason:
    1. The server is overloaded.
    2. Maintenance operation is in progress.
  • Troubleshooting steps:
    1. Check server resource usage (CPU, RAM).
    2. Make sure the server is configured with a "Retry-After" header to indicate when service will be restored.
    3. Provide a friendly maintenance page to inform users of the situation.

504 Gateway Timeout

The server, acting as a gateway, timed out while waiting for a response from the upstream server.

  • reason:
    1. The upstream server is responding slowly.
    2. The connection between servers was lost.
  • Troubleshooting steps:
    1. Verify the health of the upstream server.
    2. Increase the server connection timeout configuration.
    3. Optimized the processing speed of upstream servers.

505 HTTP Version Not Supported

The server does not support the requested HTTP protocol version.

  • reason:
    1. The HTTP protocol version used (such as HTTP/1.0) is outdated.
  • Troubleshooting steps:
    1. Check the HTTP request header on the client side to confirm the version used.
    2. Make sure your server is configured to support common HTTP protocol versions (such as HTTP/1.1 or HTTP/2).

506 Variant Also Negotiates

There is a problem with the server's content negotiation configuration and it cannot determine an appropriate resource variant.

  • reason:
    1. A configuration error prevented the resource from selecting the appropriate version.
  • Troubleshooting steps:
    1. Check the server's content negotiation configuration.
    2. Verify that the priority configuration of the variant resource is correct.

507 Insufficient Storage (WebDAV)

The server has insufficient storage space to process the request.

  • reason:
    1. Insufficient space on the server hard drive or partition.
  • Troubleshooting steps:
    1. Check the available hard drive space on the server.
    2. Clean up unnecessary files or upgrade storage space.

508 Loop Detected (WebDAV)

An infinite loop was detected in the request.

  • reason:
    1. There is infinite recursion in resource configuration or code logic.
  • Troubleshooting steps:
    1. Check the server configuration for duplicate references to resources.
    2. Optimize code to prevent circular logic.

510 Not Extended

The server needs additional information to fulfill the request.

  • reason:
    1. The request is missing an extension that the server requires.
  • Troubleshooting steps:
    1. Identify the extensions required by the server.
    2. Update client requests to include required information.

511 Network Authentication Required

Clients need to authenticate themselves to gain network access.

  • reason:
    1. The network you are using requires authentication (such as a public Wi-Fi login page).
  • Troubleshooting steps:
    1. Check whether the user needs to access the login page.
    2. Check whether the server network authentication configuration is normal.

How to learn and understand HTTP status codes?

1. Understand the role of status codes

Each status code describes a specific request response situation, such as the user's browsing behavior (4xx) or the server's processing logic (5xx).

2. Refer to official resources and tools

Official documentation:

MDN HTTP Status Codes

IETF HTTP specification

Online tools:

Google Search Console

Redirect Checker

3. Actual operation and testing

Use developer tools or online tools to test the behavior of various status codes.

Conclusion: Master HTTP status codes and improve website performance!

Being familiar with HTTP status codes not only helps you quickly troubleshoot website errors, but also helps optimize user experience and SEO performance. Therefore, whether you're troubleshooting errors or optimizing your website, being familiar with HTTP status codes is a must-have skill.

If you don’t have a programming background, or you need a functional and clearly structured website, you can contact a professional web design company like our professional team, who can easily help you build a website architecture that meets the overall SEO requirements!

👉 Contact us now to learn more website design and optimization tips! 🚀

Subscribe to our blog below and we'll send you the latest information on website development every week! Thank you for reading!

Subscribe to insights and get more knowledge articles

GET BETTER RESULTS BY UPGRADING TODAY!​