site-health
A fast CLI for checking website and domain health.
Status: Go rewrite complete (v0.9.3)
Quick Start
site-health example.com
site-health --verbose example.com
site-health --mail example.com
site-health --skip-mail example.com
site-health --mail-checks spf example.com
site-health --format json example.com
Features
Zero external dependencies — stdlib only:
- Domain registration expiry
- Registrar lookup
- Optional verbose output for troubleshooting
- DNS resolution (A, AAAA, CNAME)
- TCP connectivity (80/443)
- HTTP/HTTPS availability
- Redirect and canonical URL validation
- SSL certificate validation
- Response time measurement
- HTML content validation
- Common server/PHP/WordPress error detection
- Parked domain detection
- Final summary with failure and warning counts
- MX record lookup, including Null MX recognition
- SPF TXT record validation
- DMARC TXT record validation
- Mail checks skippable in site mode with
--skip-mail
- Individual mail checks selectable with
--mail-checks and --skip-mail-checks
- Optional
/llms.txt availability check (skippable with --skip-llms-txt)
- Machine-readable JSON output for automation and monitoring
Usage
Run the full website/domain health check. By default, output is a concise dashboard:
site-health example.com
Example:
Site Health Check
Domain: example.com
Expected URL: https://example.com/
SITE HEALTH
───────────
● example.com
DNS OK
HTTPS OK
SSL 81 days
Redirect OK
Response 184 ms
Mail OK
Status: HEALTHY
When a forwarded or explicit canonical URL matters, the dashboard includes it:
Site Health Check
Domain: example.com
Expected URL: https://example.org/
SITE HEALTH
───────────
● example.com
DNS OK
HTTPS OK
SSL 81 days
Redirect OK
Response 184 ms
Mail OK
Status: HEALTHY
Show detailed troubleshooting diagnostics instead of the dashboard:
site-health --verbose example.com
Run only mail-related DNS checks:
site-health --mail example.com
Mail mode checks only:
Example:
MAIL HEALTH
───────────
● example.com
MX OK
SPF OK
DMARC WARN
Status: WARNING
Show detailed mail diagnostics:
site-health --mail --verbose example.com
Run only selected mail checks:
site-health --mail-checks spf example.com
site-health --mail-checks mx,dmarc example.com
site-health --mail --mail-checks spf example.com
Skip selected mail checks:
site-health --skip-mail-checks spf example.com
site-health --mail --skip-mail-checks spf example.com
The supported mail check names are mx, spf, and dmarc. --mail-checks and --skip-mail-checks filter the mail portion of the current run. Use them with --mail for mail-only output, or without --mail for a full site health run with filtered mail checks. Use --skip-mail when you want a full site health run without mail checks.
Skip mail-related DNS checks in a full site health run:
site-health --skip-mail example.com
This skips MX, SPF, and DMARC checks when mail health is outside the monitoring scope. For domains you control that deliberately do not send or receive mail, explicit no-mail DNS policy is still preferred: Null MX, SPF -all, and DMARC p=reject.
Skip the optional /llms.txt check:
site-health --skip-llms-txt example.com
Forwarded domains are detected automatically when the final URL is unambiguous:
site-health example.com
To strictly require a specific final URL, provide it explicitly:
site-health --expected-url https://example.org/ example.com
Output a machine-readable JSON document instead of the dashboard (useful for scripts, CI, and monitoring). --verbose output is suppressed in JSON mode; the same exit codes apply (0 healthy, 1 issues found):
site-health --format json example.com
Example:
{
"tool": "site-health",
"version": "0.9.3",
"domain": "example.com",
"mode": "site",
"expected_url": "https://example.com/",
"forwarding": {
"auto_detected": false,
"ambiguous": false,
"candidates": []
},
"checks": {
"dns": { "status": "OK", "a": ["104.20.23.154"], "aaaa": [] },
"https": { "status": "OK" },
"ssl": { "status": "OK", "days_remaining": 81, "subject": "CN=example.com" },
"redirect": { "status": "OK" },
"response": { "status": "OK", "ms": 184 },
"domain_registration": {
"status": "OK",
"registrar": "MarkMonitor Inc.",
"expires_at": "2028-09-14T04:00:00Z",
"days_remaining": 757
},
"mail": {
"status": "OK",
"mx": { "status": "OK", "records": ["0 ."] },
"spf": { "status": "OK", "records": ["v=spf1 -all"] },
"dmarc": { "status": "OK", "records": ["v=DMARC1;p=reject"] }
}
},
"issues": [],
"summary": { "failures": 0, "warnings": 0, "status": "HEALTHY" }
}
In mail-only mode, the checks object contains just the mail block and the top-level mode is "mail". When mail checks are skipped with --skip-mail, the mail block is omitted. When individual mail checks are skipped with --mail-checks or --skip-mail-checks, only the enabled mail subchecks appear under checks.mail.
Installation
Homebrew
Preferred installation method on macOS:
brew install atillalab/tap/site-health
Install with go install
go install github.com/atillalab/site-health@latest
Pre-built binary
Download the latest release for your platform from GitHub Releases.
Build from source
Clone the repository and build:
git clone https://github.com/atillalab/site-health.git
cd site-health
go build -o site-health .
The resulting binary has zero external dependencies.
Exit codes
0 — healthy, no failures
1 — one or more checks failed
2 — usage error (missing domain, invalid flag, etc.)
Development
Run tests
go test ./...
Build
go build -o site-health .
Vet
go vet ./...
License
MIT