HTTP Status Code Reference for Website Troubleshooting: Find and Fix 4xx and 5xx Errors
HTTPweb developmentserver errors404 errors500 errorstroubleshooting

HTTP Status Code Reference for Website Troubleshooting: Find and Fix 4xx and 5xx Errors

TTruly.cloud Editorial Team
2026-11-18
8 min read

A practical HTTP status code reference for diagnosing 4xx and 5xx errors, redirects, CDN behavior, and recurring website failures.

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

CodeMeaningCheck firstTypical next action
200OKWhether the body contains the expected page or API resultInspect application output if a successful response still shows an error
201CreatedResource creation and the returned location or identifierConfirm the client handles the response body and follow-up URL correctly
204No ContentWhether the client incorrectly expects a response bodyAdjust client behavior or return an appropriate representation
206Partial ContentRange headers and download or media behaviorCheck range support, cache behavior, and incomplete transfers
301Permanent redirectRedirect destination, loops, and old cached redirectsUse a single intentional destination and update internal links
302Temporary redirectWhether temporary behavior is intendedReview redirect rules and application logic; use a permanent redirect only when appropriate
304Not ModifiedCache validators such as ETag and Last-ModifiedCheck cache headers if content appears stale
307 or 308Temporary or permanent redirect preserving the methodPOST, PUT, or other non-GET requests in the redirect chainVerify that the destination accepts the preserved method and body
400Bad RequestSyntax, parameters, headers, cookies, or malformed JSONValidate the request and compare it with a known-good request
401UnauthorizedAuthentication credentials, token expiry, and authentication schemeRefresh or correct credentials without exposing secrets in logs
403ForbiddenAccess rules, file permissions, firewall rules, and application authorizationConfirm the identity and intended permission before changing access controls
404Not FoundURL spelling, routing, deployment output, and rewrite rulesRestore the resource, correct the link, or create a deliberate redirect
405Method Not AllowedAllowed methods and the client’s HTTP methodUse the supported method or update the route configuration
408Request TimeoutClient connection, proxy timeout, and request size or durationRetry cautiously and inspect network and timeout settings
409ConflictConcurrent updates, duplicate resources, or state conflictsResolve the resource state and make retries idempotent where possible
410GoneWhether the resource was intentionally removedUpdate references or provide a replacement when one exists
422Unprocessable ContentValidation messages and request fieldsCorrect the submitted data and expose useful validation feedback
429Too Many RequestsRate limits, retry guidance, and traffic patternsRespect retry timing, reduce request volume, and review capacity
500Internal Server ErrorApplication logs, recent releases, and configuration changesFind the first server-side exception and roll back or repair safely
501Not ImplementedUnsupported feature or method at the responding layerConfirm endpoint capability and whether a proxy is responding instead
502Bad GatewayReverse proxy-to-upstream connection and upstream responseCheck the origin service, proxy logs, ports, and health checks
503Service UnavailableMaintenance mode, overload, health checks, and dependency statusRestore capacity or dependency health; verify recovery from outside the server
504Gateway TimeoutWhich hop timed out and the slow upstream operationTrace 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:

  1. Reproduce: Capture the exact URL, method, timestamp, status code, response headers, and request context.
  2. Classify: Decide whether the response is a success, redirect, client-side failure, or server-side failure.
  3. Locate: Identify whether DNS, TLS, CDN, proxy, web server, application, database, or an external dependency responded.
  4. Compare: Test a known-good URL, a direct or alternate path where appropriate, and the previous deployment or configuration.
  5. Mitigate: Correct the link, restore the route, roll back safely, reduce traffic, repair the dependency, or adjust the redirect.
  6. Verify: Test from the public path, confirm logs and monitoring have recovered, and check that caches are no longer serving the old response.
  7. 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.

Related Topics

#HTTP#web development#server errors#404 errors#500 errors#troubleshooting
T

Truly.cloud Editorial Team

Technical Editor

Senior editor and content strategist. Writing about technology, design, and the future of digital media. Follow along for deep dives into the industry's moving parts.