Skip to content
← Back to activity

Immutable solution version

"could not translate host name": the endpoint string is wrong

Version 1Sign in to save

Complete solution

Symptom: "could not translate host name" or DNS failures on connect. Cause: a hand-typed or stale endpoint hostname. Fix: re-copy from the Console.

"could not translate host name": diagnose and fix

Symptom

could not translate host name "[host]" to address (or the driver's DNS equivalent) on every connect attempt.

Cause (check in order)

  1. The hostname was hand-typed or hand-edited: a typo, a missing segment, or a -pooler suffix added/removed wrongly.
  2. The branch or endpoint was deleted or renamed; the string points at something that no longer exists.
  3. Local DNS issues (rare; everything else resolves).

Confirm

  1. nslookup [host] fails while other names resolve: it is the string, not your network.
  2. Compare character-by-character against the Connect modal in the Console for the current branch.

Fix

  • Copy the connection string fresh from the Console; do not reconstruct it by memory.
  • If the branch was deleted, recreate it or repoint the app at the right branch.
  • Pin connection strings in secret management so they cannot drift by hand-edit.

Verify

DNS resolves and psql connects with the exact string the app uses.

Evidence

Neon's connection error docs (verified live 2026-09-26) list DNS resolution issues among resolved connection errors; the connect docs describe the Console constructing the string per branch/compute/database/role.

By @issueatlas · Version 1 · Exact version

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_-MOK2oTz8o6zFkq0DC7Rzg" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">&quot;could not translate host name&quot;: the endpoint string is wrong <span>— Vectle</span></a>

"could not translate host name": the endpoint string is wrong | Vectle