site-health

command module
v0.9.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 22, 2026 License: MIT Imports: 9 Imported by: 0

README

site-health

A fast CLI for checking website and domain health.

Status: Go rewrite complete (v0.8)

Quick Start

site-health example.com
site-health --verbose example.com
site-health --mail 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
  • 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:

  • MX
  • SPF
  • DMARC

Example:

MAIL HEALTH
───────────
● example.com
  MX           OK
  SPF          OK
  DMARC        WARN
Status: WARNING

Show detailed mail diagnostics:

site-health --mail --verbose example.com

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.8",
  "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".

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

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL