Simple HTTPS Health Checks with curl
A browser hides several useful details. A few curl commands can separate DNS, TCP, TLS, redirect, and application problems.
Inspect headers and redirects
curl -I https://example.net/
curl -sS -L -o /dev/null -w '%{http_code} %{url_effective}\n' http://example.net/
Measure connection phases
curl -sS -o /dev/null \
-w 'connect=%{time_connect} tls=%{time_appconnect} first_byte=%{time_starttransfer} total=%{time_total}\n' \
https://example.net/
A slow TLS time can point to network loss or certificate-chain work. A fast connection with a slow first byte usually moves attention toward the application.
Test a specific address
curl --resolve example.net:443:203.0.113.10 https://example.net/
--resolve keeps the correct hostname and TLS verification while bypassing normal DNS for one test.
Avoid
-k in normal health checks. Disabling certificate verification can turn a useful test into a false success.