An HTTP status code is a three-digit number in the first line of every HTTP response, such as HTTP/1.1 404 Not Found. The first digit gives the class, and the rest identifies the specific result.
Why it matters
Status codes are how browsers, search engines, APIs and monitors decide what happened. A wrong code causes real damage: a deleted page returning 200 creates "soft 404" problems, and a temporary error returning 404 can make crawlers drop a page. Monitors depend on codes to tell up from down.
Example
| Class | Meaning | Examples |
|---|---|---|
| 1xx | Informational | 100 Continue, 101 Switching Protocols |
| 2xx | Success | 200 OK, 201 Created, 204 No Content |
| 3xx | Redirection | 301, 302, 304 Not Modified, 308 |
| 4xx | Client error | 400, 401, 403, 404, 410, 429 |
| 5xx | Server error | 500, 502, 503, 504 |
curl -sI https://example.com/missing | head -n 1
# HTTP/2 404
Common mistakes
- Returning
200 OKwith an error page in the body, which hides failures from monitors and search engines. - Using
302where a permanent301is intended, or the reverse. - Treating all 5xx as the same.
502,503and504point to different layers. - Mixing up
401(not authenticated) and403(authenticated but not allowed).
Related
- Redirect 301/302
- Rate limiting
- Reverse proxy
- Guide: Fix 502 Bad Gateway
- Tool: HTTP status codes reference
Get notified when this term updates
Plus occasional practical tips on uptime and monitoring, nothing else. Unsubscribe anytime.
This page is general information written by our editorial team and updated when documentation changes. Servers and providers differ, so test changes safely first. See our editorial policy and disclaimer.