HTTP status codes are the first useful clue when a page, API request, redirect, or asset does not behave as expected. This reference explains the most common 2xx, 3xx, 4xx, and 5xx responses, what to check first, how browsers and CDNs can affect the result, and how to track recurring errors so future incidents are faster to diagnose.
Overview
An HTTP status code is a three-digit response from a web server, application, reverse proxy, or CDN. The first digit gives you the broad category:
- 2xx: The request was received and handled successfully.
- 3xx: The client needs to follow a redirect or can use an existing response.
- 4xx: The request cannot be fulfilled because of the request, credentials, permissions, or requested resource.
- 5xx: A server or upstream service failed to complete an otherwise plausible request.
The status code alone does not identify the complete cause. A 404 might result from a deleted page, an incorrect rewrite rule, a stale link, or a CDN serving an outdated response. A 500 might indicate an application exception, a failed deployment, a permissions problem, or an upstream dependency. Always compare the code with the request URL, response headers, server logs, application logs, and the path taken through any proxy or CDN.
For a first check, reproduce the request with the browser’s developer tools or a command-line client such as curl -I https://example.com/path. Record the final URL, redirect chain, response headers, timestamp, and whether the result changes between browsers, networks, regions, or authenticated and unauthenticated sessions.
What to track
Keep a simple status-code register for important pages, APIs, domains, and services. The goal is not to collect every response. Track recurring failures and the context needed to distinguish a local issue from a hosting, DNS, CDN, or application problem.
HTTP status code reference
| Code | Meaning | Check first | Typical next action |
|---|---|---|---|
| 200 | OK | Whether the body contains the expected page or API result | Inspect application output if a successful response still shows an error |
| 201 | Created | Resource creation and the returned location or identifier | Confirm the client handles the response body and follow-up URL correctly |
| 204 | No Content | Whether the client incorrectly expects a response body | Adjust client behavior or return an appropriate representation |
| 206 | Partial Content | Range headers and download or media behavior | Check range support, cache behavior, and incomplete transfers |
| 301 | Permanent redirect | Redirect destination, loops, and old cached redirects | Use a single intentional destination and update internal links |
| 302 | Temporary redirect | Whether temporary behavior is intended | Review redirect rules and application logic; use a permanent redirect only when appropriate |
| 304 | Not Modified | Cache validators such as ETag and Last-Modified | Check cache headers if content appears stale |
| 307 or 308 | Temporary or permanent redirect preserving the method | POST, PUT, or other non-GET requests in the redirect chain | Verify that the destination accepts the preserved method and body |
| 400 | Bad Request | Syntax, parameters, headers, cookies, or malformed JSON | Validate the request and compare it with a known-good request |
| 401 | Unauthorized | Authentication credentials, token expiry, and authentication scheme | Refresh or correct credentials without exposing secrets in logs |
| 403 | Forbidden | Access rules, file permissions, firewall rules, and application authorization | Confirm the identity and intended permission before changing access controls |
| 404 | Not Found | URL spelling, routing, deployment output, and rewrite rules | Restore the resource, correct the link, or create a deliberate redirect |
| 405 | Method Not Allowed | Allowed methods and the client’s HTTP method | Use the supported method or update the route configuration |
| 408 | Request Timeout | Client connection, proxy timeout, and request size or duration | Retry cautiously and inspect network and timeout settings |
| 409 | Conflict | Concurrent updates, duplicate resources, or state conflicts | Resolve the resource state and make retries idempotent where possible |
| 410 | Gone | Whether the resource was intentionally removed | Update references or provide a replacement when one exists |
| 422 | Unprocessable Content | Validation messages and request fields | Correct the submitted data and expose useful validation feedback |
| 429 | Too Many Requests | Rate limits, retry guidance, and traffic patterns | Respect retry timing, reduce request volume, and review capacity |
| 500 | Internal Server Error | Application logs, recent releases, and configuration changes | Find the first server-side exception and roll back or repair safely |
| 501 | Not Implemented | Unsupported feature or method at the responding layer | Confirm endpoint capability and whether a proxy is responding instead |
| 502 | Bad Gateway | Reverse proxy-to-upstream connection and upstream response | Check the origin service, proxy logs, ports, and health checks |
| 503 | Service Unavailable | Maintenance mode, overload, health checks, and dependency status | Restore capacity or dependency health; verify recovery from outside the server |
| 504 | Gateway Timeout | Which hop timed out and the slow upstream operation | Trace timings across proxy, application, database, and external services |
Record more than the number
For each recurring response, record the hostname, path, HTTP method, status code, response time, cache status, deployment version, and whether the request was served by the origin or an intermediary. Also note the affected scope: one URL, one geographic region, one account type, or the entire site. A 404 limited to a newly published route points toward routing or deployment. A 502 affecting every route points toward an origin or proxy failure.
CDNs and reverse proxies can generate or cache responses before a request reaches the origin. Compare headers that identify cache status, upstream timing, request identifiers, or the responding layer. If a fix appears correct at the origin but users still receive an old response, review cache rules and purge procedures rather than changing the application again.
For websites, combine this register with uptime monitoring and incident checks. For HTTPS-specific failures, use the SSL certificate troubleshooting guide; certificate and transport errors may prevent an HTTP status code from being returned at all.
Cadence and checkpoints
Use a recurring review schedule instead of waiting for a visible outage. A monthly or quarterly review is usually enough for stable sites, while high-change applications may need checks after each deployment and a broader review every month.
After a deployment
- Request the homepage, critical landing pages, login flow, forms, checkout or other business-critical paths.
- Test both the canonical hostname and any intentional redirects.
- Check API methods, authentication, static assets, and server-rendered error pages.
- Compare status-code volume and latency with the previous release.
Monthly or quarterly
- Review 4xx and 5xx counts by URL, method, service, and release.
- Inspect new 404s from broken internal links, renamed content, or incomplete deployments.
- Audit redirect chains and loops, especially after domain, DNS, or website migrations.
- Confirm monitoring covers the origin as well as the public CDN or proxy path.
- Test one representative recovery procedure, such as rollback, cache purge, or restoring a known-good configuration.
Keep a short incident timeline: first observed time, affected paths, code changes, configuration changes, mitigation, and confirmed resolution. This makes recurring 500, 502, 503, and 504 errors easier to compare. If the site has recently changed hosting or DNS, allow for the possibility that different resolvers, proxies, or environments are reaching different endpoints; validate each layer before declaring the incident resolved.
How to interpret changes
Interpret status codes as patterns, not isolated alarms. A small increase in 404 responses after publishing new content may indicate links that were never updated. A sudden increase in 401 responses may reflect an expired credential, while a rise in 403 responses can indicate a changed authorization or firewall rule. A 429 spike often requires a traffic and client-behavior review rather than a server restart.
Separate user-generated errors from service failures. Invalid form input, an expired session, or a request for a removed resource can produce legitimate 4xx responses. They become operational problems when they are caused by broken links, a defective client, an incorrect frontend deployment, or an API contract change.
For 5xx responses, establish which component returned the code. A direct origin request, a public request through the CDN, and a request through an internal load balancer may produce different results. Check the request ID across proxy and application logs, then follow the request in order: DNS resolution, TLS negotiation, edge or CDN, load balancer, web server, application, database, and external dependencies.
Do not treat every retry as a fix. Retrying can help with a temporary network or dependency issue, but aggressive retries can worsen overload and contribute to 429 or 503 responses. Prefer bounded retries with backoff for safe operations, and design write requests so a repeated request does not create duplicate effects.
Search-engine and browser behavior also depends on the response context. A permanent redirect, a temporary redirect, a soft error page returned with 200, and a genuine 404 communicate different intentions. During an SEO crawl or redirect audit, verify both the HTTP code and the page content so an error page is not accidentally presented as a successful document.
When to revisit
Revisit this reference during your normal monthly or quarterly operations review, after a hosting or CDN change, and whenever a deployment introduces a new route, authentication flow, API version, or caching rule. Update your own status-code register whenever recurring data changes: a new error appears, an established error changes frequency, or the responding layer moves from the origin to a proxy.
Use this practical triage sequence during an incident:
- Reproduce: Capture the exact URL, method, timestamp, status code, response headers, and request context.
- Classify: Decide whether the response is a success, redirect, client-side failure, or server-side failure.
- Locate: Identify whether DNS, TLS, CDN, proxy, web server, application, database, or an external dependency responded.
- Compare: Test a known-good URL, a direct or alternate path where appropriate, and the previous deployment or configuration.
- Mitigate: Correct the link, restore the route, roll back safely, reduce traffic, repair the dependency, or adjust the redirect.
- Verify: Test from the public path, confirm logs and monitoring have recovered, and check that caches are no longer serving the old response.
- Document: Record the cause, evidence, fix, and a preventive check for the next review.
For related operational work, see the guides on cloud hosting resources, backup and restore testing, and DNS and domain configuration. Keeping those foundations documented makes HTTP error troubleshooting more consistent and gives each status code a clear next action.