Identify the stage that stopped
Verbose curl output helps locate progress through name resolution, connection, TLS, request transmission and HTTP response. An HTTP 500 differs from a connection failure before any HTTP response. Record URL, method, time, proxy conditions and curl version first. A command using different authentication, cookies, headers or HTTP version from the browser does not necessarily reproduce the user request. Begin with few changed conditions and identify the last stage supported by evidence. One successful request does not establish health for every region or client path. The procedure is valuable when its request conditions are explicit enough to explain why it matches, or intentionally differs from, the affected operation.
Record one request without saving its body
The example enables verbose output, bounds connection and total duration, and discards the response body through /dev/null. Verbose information normally goes to standard error, so preserve it separately from body output when recording. Requests with authentication or cookies can expose information in diagnostic logs; share only what the investigation requires. The example demonstrates an ordinary GET procedure rather than reports a current measured response from example.com. The -I option uses HEAD, which may take a different application path from GET. A comparison that changes method merely because the body is unnecessary is a different experiment unless that difference is accounted for explicitly.
curl --verbose --connect-timeout 3 --max-time 10 \
--output /dev/null https://example.com/Separate exit status from HTTP status
Curl’s process exit code and the HTTP status code are distinct. By default, receiving an HTTP 404 or 500 can still yield exit code zero because the transfer itself succeeded. If HTTP errors should produce a failing process result, check the relevant fail options and installed-version support. Conversely, a nonzero exit does not prove the remote business effect never occurred; the reply could have been lost after processing. Read how far resolution, TCP, certificate validation and headers progressed. An exit code categorizes the tool’s result, not the final state of every server-side operation. Preserve that distinction before recommending retries of modifying requests.
Control comparisons that change the destination
For a controlled DNS comparison, --resolve can supply the address used for a particular hostname and port while keeping the URL hostname. That can preserve the intended SNI and certificate-name condition more faithfully than replacing the URL with an IP literal. Still inspect proxies, reuse and the actual connected path. An IP URL can change virtual-host routing as well as verification. Success with certificate checking disabled is not evidence of normal TLS health. When following redirects, keep the initial response and final destination distinct and check method and credential behavior. Each destination override should answer a specific hypothesis rather than silently changing several independent conditions until something succeeds.
Match timing evidence with the user path
Write-out timings offer views such as resolution, connection, first response and total completion. Cumulative values, connection reuse and proxy behavior affect interpretation, so do not add every field as an independent duration or claim simple subtraction always isolates server execution. Separate fresh and reused connections, successes and failures, then correlate with application logs or traces. After repair, repeat the same method, endpoint-selection policy, headers and deadlines. Check HTTP status, body meaning and the operation’s actual success. Shorter verbose output is not itself improvement; the objective is a valid, timely response through the path the user needs. Document the limits of the timing evidence alongside the observed change.