What is HTTP Status Codes?

Turkish: HTTP Durum Kodları

HTTP status codes are three-digit response signals showing whether a request succeeded, was redirected, or failed on the client or server side.

What Are HTTP Status Codes?

HTTP status codes use a standard number to describe how a server handled an HTTP request. Browsers, API clients, search engines, and monitoring tools use these codes to decide what should happen next.

The codes are grouped into five classes. 1xx is informational, 2xx means success, 3xx indicates redirection, 4xx points to a client-side problem, and 5xx points to a server-side problem. For example, 200 OK means a successful response, 201 Created means a new resource was created, 301 Moved Permanently means a permanent redirect, 404 Not Found means the resource was not found, and 500 Internal Server Error signals an unexpected server failure.

Role in APIs and Websites

Status codes are not just protocol trivia; they shape product behavior. A payment API should return a clear 400-class response for invalid card input, and should not turn business-rule failures such as insufficient stock into vague 500 responses. Websites use 301 and 308 redirects during SEO migrations, 404 and 410 for removed content, and 503 for temporary maintenance.

Common Mistakes

Returning 200 for every outcome breaks monitoring, caching, and client-side error handling. Treating every problem as a 500 makes it harder for API consumers to act correctly. Choosing codes that match HTTP semantics is a core part of reliable REST API design.