Use this the moment a Postgres client (an automation tool, a script, anything outside Supabase itself) throws "host not found" or a DNS resolution error while connecting to a Supabase database.
Steps
- Go to your Supabase project, click the green Connect button near the top.
- Instead of the Direct connection tab, look for Session Pooler.
- Copy the connection details from that string instead:
postgresql://postgres.<project-ref>:[PASSWORD]@aws-x-<region>.pooler.supabase.com:5432/postgres - Update your client's connection settings:
- Host:
aws-x-<region>.pooler.supabase.com - User:
postgres.<project-ref>(note the dot and project ref, not justpostgres) - Port:
5432(this is what marks it as the session pooler, not the transaction pooler on6543)
- Host:
- Reconnect.
Gotcha
Supabase's direct connection domain is IPv6-only by default unless you pay for an IPv4 add-on. Most home networks and many local dev environments can't resolve it, which shows up as a vague "host not found" rather than a clear IPv6 error, making it easy to misdiagnose as a typo.
If you also see a "self-signed certificate in certificate chain" error after switching to the pooler, set your client's SSL mode to Allow and, if the option exists, enable "Ignore SSL Issues." The connection is still encrypted, this just relaxes strict certificate chain validation, a known and common fix for this exact pairing.
Quick reference
Host: aws-x-<region>.pooler.supabase.com
Port: 5432
User: postgres.<project-ref>
SSL: Allow