Skip to main content
CheckTown
Dev Tools

HTTP Status Codes: The Complete Reference Guide

Published 6 min read
In this article

What Are HTTP Status Codes?

HTTP status codes are three-digit numbers returned by web servers in response to a client’s request. They indicate whether a request was successful, redirected, resulted in an error, or requires further action. Every time you load a web page, your browser receives one of these codes.

Status codes are defined by the HTTP specification (RFC 7231 and related RFCs) and are grouped into five classes based on their first digit. Understanding these codes is essential for web developers, API designers, and anyone debugging web applications.

The Five Status Code Categories

HTTP status codes are organized into five categories, each indicating a different type of response.

  • 1xx Informational — the request was received and processing continues (e.g., 100 Continue, 101 Switching Protocols)
  • 2xx Success — the request was successfully received, understood, and accepted (e.g., 200 OK, 201 Created, 204 No Content)
  • 3xx Redirection — further action is needed to complete the request (e.g., 301 Moved Permanently, 302 Found, 304 Not Modified)
  • 4xx Client Error — the request contains bad syntax or cannot be fulfilled (e.g., 400 Bad Request, 401 Unauthorized, 403 Forbidden, 404 Not Found)
  • 5xx Server Error — the server failed to fulfill a valid request (e.g., 500 Internal Server Error, 502 Bad Gateway, 503 Service Unavailable)

Try it free — no signup required

Look Up Status Codes →

When To Use an HTTP Status Code Reference

Knowing the right status code to return or expect is crucial for building reliable web services.

  • API development — choose the correct response code for each endpoint (201 for creation, 204 for deletion, 422 for validation errors)
  • Debugging — diagnose issues when requests fail (is it a 401 authentication problem or a 403 authorization issue?)
  • SEO and monitoring — track 301/302 redirects, identify 404 broken links, and monitor 5xx server errors

Frequently Asked Questions

What is the difference between 401 and 403?

401 Unauthorized means the client has not provided valid authentication credentials — the user needs to log in or provide an API key. 403 Forbidden means the client is authenticated but does not have permission to access the resource. In short: 401 = ‘who are you?’, 403 = ‘I know who you are, but you can’t access this.’

When should I use 301 vs 302 redirects?

Use 301 Moved Permanently when the resource has permanently moved to a new URL — search engines will update their index. Use 302 Found (or 307 Temporary Redirect) when the redirect is temporary and the original URL should still be used in the future. Using the wrong one can hurt SEO.

What does a 500 Internal Server Error mean?

A 500 error is a generic server-side error indicating that something went wrong while processing the request, but the server can’t be more specific. Common causes include unhandled exceptions in application code, database connection failures, misconfigured servers, or deployment issues. Check the server logs for the actual error details.

Related Tools