PostgreSQL FATAL: no pg_hba.conf entry for host (SSL off)
Server requires `hostssl` TLS connections while client connected without `sslmode=require`.
Runs locally in browser
Free · No login
Independently Verified 2026-11-25
v4.1.0
Identifier: PostgreSQL FATAL
Platform: PostgreSQL
Common Root Causes:
- Server requires `hostssl` TLS connections while client connected without `sslmode=require`.
Interactive Diagnostic Checklist
Verified Solutions:
- Pass `sslmode=require` (or `verify-full`) in the client connection string.
Safe Diagnostic Command:
psql "postgresql://user@host/db?sslmode=require"
Warning: Verify configuration changes in staging or with dry-run flags (e.g. nginx -t) before reloading production services.
Technical Explanation
Server requires `hostssl` TLS connections while client connected without `sslmode=require`. Recommended diagnostic: `psql "postgresql://user@host/db?sslmode=require"`. Remediation: Pass `sslmode=require` (or `verify-full`) in the client connection string.
Worked Examples
- Run `psql "postgresql://user@host/db?sslmode=require"` to verify root cause before applying the remediation.
Limitations & Assumptions
- Always verify configuration changes in staging or with dry-run flags (e.g. `nginx -t`) before reloading production services.
Source References & Verification
Resource ID: err-pg-ssl-required-pg-hba · Independently verified: 2026-11-25