$ curl -LI mazgi.com -o /dev/null -w '%{http_code}\n' -s

cURLでHTTPステータスコードだけを取得する