ERROR CATEGORY
HTTP & Server Errors
Practical guides to HTTP 5xx responses and connection-level failures, with a structured way to identify whether the cause is the browser, network, proxy, web server, application or backend dependency.

About this error category
# HTTP & Server Errors
HTTP and server errors occur when a request cannot be completed normally. Some failures return an HTTP status code such as 500, 502, 503 or 504. Others happen before the browser receives an HTTP response, producing messages such as ERR_CONNECTION_REFUSED or ERR_CONNECTION_TIMED_OUT.
The browser message identifies the symptom, not always the component that needs attention. Start by locating the failing boundary: browser to network, network to listening service, proxy to backend, or application to dependency.
Identify the failure type first
An HTTP status code was returned
A numeric status means an HTTP-capable component responded. That component might be the origin web server, a reverse proxy, load balancer or CDN rather than the application itself.
- 500 Internal Server Error: The server encountered an unexpected condition while processing the request. Begin with the application and web-server logs. See the [500 Internal Server Error guide](/http-500-internal-server-error).
- 502 Bad Gateway: A proxy received an invalid, empty or unusable response from its backend. Check the backend process, upstream host and port, and the connection between the proxy and origin. See the [502 Bad Gateway guide](/http-502-bad-gateway).
- 503 Service Unavailable: The service cannot handle the request at that time. Possible directions include maintenance mode, exhausted capacity, an unavailable process or a failed dependency. See the [503 Service Unavailable guide](/http-503-service-unavailable).
- 504 Gateway Timeout: A gateway forwarded the request but did not receive a response before its timeout expired. The backend may still be running but slow, overloaded or waiting on another service. See the [504 Gateway Timeout guide](/http-504-gateway-timeout).
A status code does not, by itself, prove which layer failed. Inspect the response branding, headers, timestamp and logs to determine whether the response came from the origin or an intermediary.
The browser reports a connection failure
A connection-level error means the browser did not receive a normal HTTP response from the expected endpoint.
- ERR_CONNECTION_REFUSED: The destination was reached, but the connection was rejected. Check whether a service is listening on the expected port and whether local or network security rules affect access. For development environments, see [ERR_CONNECTION_REFUSED on localhost](/err-connection-refused-localhost).
- ERR_CONNECTION_TIMED_OUT: The browser waited without receiving a usable response. Investigate the network path, routing, filtering, DNS, server reachability and resource availability before looking for an application-generated HTTP error. See the [ERR_CONNECTION_TIMED_OUT guide](/err-connection-timed-out).
A practical diagnosis sequence
1. Reproduce and record the failure
Reload once, then try the same URL in a private window or on another device. Record the exact URL, error text, status code, approximate time and visible response page. A branded CDN or proxy page suggests that the request reached an intermediary; a generic browser message may mean that no usable HTTP response arrived.
If only one browser or device fails, inspect its proxy, VPN, DNS cache, extensions and local security software. If the same URL fails across devices and networks, the server, proxy, origin or shared network path becomes more likely.
2. Define the affected scope
Determine whether the problem affects one route, one host, an entire application or the whole service.
- One route failing can indicate application code, a route-specific dependency or a slow query.
- Every route returning 500 suggests a broader application or server configuration problem.
- A 502 or 504 across a proxy directs attention to the origin process, upstream connection or proxy configuration.
- A refused connection on one port can mean that the expected service is not listening while other services remain available.
Compare a working endpoint with the failing one when possible. Differences in routing, authentication, dependencies and deployment state can be more informative than changing unrelated client settings.
3. Check the component that generated the response
For a 500, correlate application and web-server logs with the failure time. For 502, 503 and 504 responses, inspect both proxy or gateway logs and backend logs. Look for a stopped process, failed deployment, dependency connection failure, resource exhaustion or a request that exceeds a relevant timeout.
For a local ERR_CONNECTION_REFUSED, verify that Apache or Nginx is running and that the configured port is available. XAMPP, Laragon and MAMP can show this symptom when their web server has not started or another program prevents it from binding to the expected port.
4. Test the origin and dependencies separately
Where you administer the service, check whether the backend accepts connections and responds to a simple endpoint without assuming that a successful proxy connection proves the application is healthy. Then check required services such as the database or other configured dependencies.
A backend that is alive but consistently slow is more consistent with a 504 than a backend that is stopped or returning an unusable response, which can produce a 502. A 503 may occur before an application request is processed if the service is deliberately unavailable or a required dependency cannot be used.
Avoid repeated refreshes as a troubleshooting method. They can add load while the underlying process, dependency or timeout problem is being investigated.
Use error details to locate the layer
The response body, headers and timestamp can reveal which component handled the failure:
- A generic browser message usually indicates that no usable HTTP response was received.
- A branded proxy or CDN page indicates that an intermediary generated or presented the error.
- An application-specific error page may point more directly to the origin application.
For intermittent failures, correlate the timing with deployments, traffic increases, process restarts and dependency latency. For consistent failures, compare a working request with the failing request and inspect configuration differences before changing server settings.
For sites using Cloudflare, a Cloudflare-branded 504 generally means its edge could not obtain a response from the origin within the applicable timeout window. The [504 Gateway Timeout Behind Cloudflare guide](/504-gateway-timeout-cloudflare) explains how to separate an origin problem from a timeout produced by another gateway or by the origin itself.
What to include when requesting help
A useful report includes:
- The exact error text and status code
- The URL path and approximate failure time
- Whether the issue affects other users, devices or networks
- Whether a proxy, CDN or load balancer is involved
- Relevant web-server, proxy and application log entries, with passwords, tokens and other secrets removed
The objective is to identify the failing boundary. Once that boundary is known, the relevant error guide can provide more targeted checks without treating browser, network, proxy and backend causes as interchangeable.
GUIDE LIBRARY
Error guides in this category
Start with the error you can see, then follow the diagnosis through to verification.
403 Forbidden Error: What It Means and How to Fix It
An HTTP 403 Forbidden response means the server understood the request but refuses to authorize access to the requested resource. The request may be blocked by account p…
Read diagnosis →404 Not Found Error: What It Means and How to Fix It
HTTP 404 Not Found means the server was reached, but it could not find a current representation of the requested resource. Check the URL for spelling, case and outdated …
Read diagnosis →
500 Internal Server Error
A 500 Internal Server Error means the server encountered an unexpected problem while processing the request. The browser usually cannot identify the cause, so start by m…
Read diagnosis →
502 Bad Gateway
A 502 Bad Gateway means a reverse proxy, load balancer, or CDN could not obtain a valid response from the backend server. Check the backend process, proxy error log, ups…
Read diagnosis →
503 Service Unavailable
A 503 Service Unavailable response means the service cannot handle the request at that time. Common causes include exhausted CPU, memory, worker, or connection capacity;…
Read diagnosis →
504 Gateway Timeout
A 504 Gateway Timeout means a proxy, CDN, load balancer, or gateway waited for a backend response but its timeout expired first. The backend may still be running; common…
Read diagnosis →
504 Gateway Timeout Behind Cloudflare
A Cloudflare-branded 504 Gateway Timeout usually means Cloudflare’s edge did not receive a timely response from your origin. Common causes include slow database or appli…
Read diagnosis →Cloudflare Error 1020 / 1015: Access Denied & Rate Limited
Cloudflare Error 1020 means a Cloudflare firewall, WAF or security rule denied the request. Error 1015 means the request matched a configured rate limit. Visitors should…
Read diagnosis →
ERR_CONNECTION_REFUSED
ERR_CONNECTION_REFUSED means the browser reached a destination address, but the connection was rejected before the website returned a response. Common causes include a s…
Read diagnosis →
ERR_CONNECTION_REFUSED on Localhost (XAMPP, Laragon, MAMP)
`ERR_CONNECTION_REFUSED` on localhost means the browser cannot connect to a listening local web server. In XAMPP, Laragon, or MAMP, first confirm that Apache or Nginx is…
Read diagnosis →
ERR_CONNECTION_TIMED_OUT
`ERR_CONNECTION_TIMED_OUT` means the browser waited for the destination server or an intermediary to respond, but no usable response arrived before the connection timeou…
Read diagnosis →ERR_EMPTY_RESPONSE
`ERR_EMPTY_RESPONSE` means the connection was established but closed before the browser received usable HTTP response headers or body data. Test the failing URL from ano…
Read diagnosis →HTTP 200 OK: What It Means
HTTP 200 OK means the server successfully processed the request and returned a response. It is usually expected, but it does not prove that the page content, API data, a…
Read diagnosis →HTTP 201 Created: What It Means
HTTP 201 Created means the server successfully fulfilled the request and created one or more resources. It is commonly returned after a successful POST or resource-creat…
Read diagnosis →HTTP 204 No Content: What It Means
HTTP 204 No Content means the server successfully handled the request and intentionally returned no response body. It is not automatically an error or evidence that the …
Read diagnosis →HTTP 301 Moved Permanently: What It Means
HTTP 301 Moved Permanently means the requested resource has been assigned a permanent redirect to another URL, usually identified by the `Location` response header. A 30…
Read diagnosis →HTTP 302 Found: What It Means
HTTP 302 Found means the requested resource is temporarily available at another URL. The response commonly includes a `Location` header identifying where the client shou…
Read diagnosis →HTTP 304 Not Modified: What It Means
HTTP 304 Not Modified means a client made a conditional `GET` or `HEAD` request and the cached representation is still current. The server tells the client to reuse its …
Read diagnosis →HTTP 400 Bad Request: What It Means and How to Fix It
HTTP 400 Bad Request means the server or an intermediary could not process the request because its syntax, parameters, headers, URL, or other details were invalid. Verif…
Read diagnosis →HTTP 401 Unauthorized: What It Means and How to Fix It
HTTP 401 Unauthorized means the endpoint requires authentication, but the request did not include acceptable credentials or the credentials were rejected. Confirm the ex…
Read diagnosis →HTTP 405 Method Not Allowed: What It Means and How to Fix It
HTTP 405 Method Not Allowed means the server understood the HTTP method, such as GET, POST, PUT or DELETE, but that method is not supported for the requested resource. T…
Read diagnosis →HTTP 408 Request Timeout: What It Means and How to Fix It
HTTP 408 Request Timeout means the server or an intermediary did not receive the complete HTTP request within the time it was prepared to wait. It can result from a slow…
Read diagnosis →HTTP 409 Conflict: What It Means and How to Fix It
HTTP 409 Conflict means the server cannot complete a request because it conflicts with the current state of the target resource. It commonly occurs when an update collid…
Read diagnosis →HTTP 410 Gone: What It Means and How to Fix It
HTTP 410 Gone means the server believes the requested resource has been intentionally removed and is unlikely to return at that URL. Confirm the exact URL and request me…
Read diagnosis →HTTP 413 Content Too Large: What It Means and How to Fix It
HTTP 413 Content Too Large means the request body is larger than the server or an intermediate component is willing or configured to process. It commonly appears during …
Read diagnosis →HTTP 414 URI Too Long: What It Means and How to Fix It
HTTP 414 URI Too Long means the request target, usually the URL and its query string, is longer than the receiving server or intermediary is willing to process. Check fo…
Read diagnosis →HTTP 415 Unsupported Media Type: What It Means and How to Fix It
HTTP 415 Unsupported Media Type means the server rejected the request because the format or encoding of the submitted content is not supported for that resource. Confirm…
Read diagnosis →HTTP 422 Unprocessable Content: What It Means and How to Fix It
HTTP 422 Unprocessable Content means the server understood the request format and syntax but could not process the instructions or data it contained. The usual cause is …
Read diagnosis →HTTP 429 Too Many Requests: What It Means and How to Fix It
HTTP 429 Too Many Requests means the server or an intermediary has rate-limited the client after receiving too many requests in a defined period. Check the `Retry-After`…
Read diagnosis →HTTP 4xx Client Errors: Meaning, Diagnosis and Fixes
An HTTP 4xx response means the server or an intermediary could not fulfill a request as received. Identify the exact status code first, then check the URL, method, authe…
Read diagnosis →HTTP 501 Not Implemented: What It Means and How to Fix It
HTTP 501 Not Implemented means the server does not support the functionality required to fulfill the request. Confirm the exact URL, HTTP method, response headers, and c…
Read diagnosis →HTTP 505 HTTP Version Not Supported: What It Means and How to Fix It
HTTP 505 means the server does not support the major HTTP protocol version used in the request. It is different from a DNS or TLS failure because an HTTP endpoint return…
Read diagnosis →HTTP 5xx Server Errors: Meaning, Diagnosis and Fixes
An HTTP 5xx response means a server or intermediary could not complete an otherwise valid request. Identify the exact status code and the layer that generated it—applica…
Read diagnosis →Site Administrator
Last reviewed: September 25, 2026
FAQ
Frequently asked questions
What is the difference between a 500 error and a connection error?
A 500 error means an HTTP-capable server returned a response but encountered an unexpected condition while processing the request. A connection error such as ERR_CONNECTION_REFUSED or ERR_CONNECTION_TIMED_OUT occurs before the browser receives a normal HTTP response, so diagnosis starts with listening services, network access and the connection path.
Is a 502 or 504 error usually caused by the browser?
Usually not. A 502 means a proxy received an invalid, empty or unusable response from its backend. A 504 means the backend did not respond within the gateway’s timeout window. Check the proxy, origin process and backend logs before changing browser settings.
How can I distinguish a 503 maintenance page from an overloaded service?
The status code alone cannot distinguish those causes. Check maintenance or deployment configuration, process health, resource usage and dependency availability. A 503 may be intentional, caused by capacity limits or triggered when a required service such as a database is unavailable.
Why does ERR_CONNECTION_REFUSED happen on localhost?
The local web server may not be running, or another program may already be using the port configured for Apache or Nginx. Check the server controls in XAMPP, Laragon or MAMP, confirm the configured port and review the server’s startup or binding error before investigating project code.
What should I check first when ERR_CONNECTION_TIMED_OUT appears?
Test the URL from another network or device, then review VPN, proxy, firewall and DNS conditions. If it fails consistently across networks, investigate routing, server reachability, filtering and resource usage. A timeout means the browser waited without receiving a usable response rather than receiving an explicit refusal.
Does a Cloudflare 504 mean Cloudflare is the origin server?
No. A Cloudflare-generated 504 generally means Cloudflare’s edge sent the request toward the origin but did not receive a response within the applicable timeout window. Inspect origin performance and connectivity, then use the [Cloudflare 504 guide](/504-gateway-timeout-cloudflare) to identify the layer that produced the timeout.