Skip to content
MtrXTools

curl: (6) Could not resolve host

The hostname doesn't resolve

Seen in curl, wget ("unable to resolve host address") · Last updated

DNS returned no address for the name, or the resolver could not be reached.

Common causes

  • A typo in the hostname.
  • The record does not exist or has been removed (NXDOMAIN).
  • The machine has no working DNS resolver (VPN, container, offline).

How to fix it

  1. Check the spelling and that the record exists.
  2. Look up the name against a public resolver to compare.
  3. Check /etc/resolv.conf or the VPN's DNS settings.
Look up the name

Got a different message? Paste it into the error explainer.

Related errors

All 34 Command line & code errors