Test if a Website Is Down with curl

Send a quick HTTP request from the terminal to check whether a site responds and what status it returns.

macOScurlnetworkDiagnosticsLow risk
Run `curl -I -L --max-time 10 https://example.com` — an HTTP/200 line means the site is up; a timeout or 'Could not resolve host' error means it isn't reachable.

01Command

Command
$ curl -I -L --max-time 10 https://example.com

02What it does

curl asks the site directly for its headers, so the response tells you the truth about the server rather than what your browser cache shows. HTTP 200/301/302 mean the site is alive; 5xx codes mean the server itself is erroring; 'Could not resolve host' points at DNS; a timeout with everything else working usually means the site or your route to it is down. Comparing the result with another site (e.g. `curl -I https://apple.com`) tells you whether the problem is that one site or your own connection.

03Risk

RiskLow risk

04Undo

✓No undo needed — this command does not change persistent state.

05Sources

Last verified: 2026-09-18 · Category: Network

06Related solutions