No such host is known
Windows couldn't resolve the hostname
Seen in .NET (SocketException 11001, HttpRequestException), PowerShell, Windows apps
DNS lookup failed on Windows (WSAHOST_NOT_FOUND, 11001), so no connection was attempted.
Common causes
- A typo in the hostname or a URL passed where a host was expected.
- The record does not exist, or only resolves on a VPN or internal network.
- Windows has no working DNS server, or a stale entry in the hosts file.
How to fix it
- Check the host in the message and resolve it: Resolve-DnsName example.com.
- Check the DNS servers on the adapter and VPN, and C:\Windows\System32\drivers\etc\hosts.
- Clear the DNS cache with ipconfig /flushdns after fixing records.
Got a different message? Paste it into the error explainer.
Related errors
- socket.gaierror: [Errno -2] Name or service not known · Python couldn't resolve the hostname
- socket.gaierror: [Errno -3] Temporary failure in name resolution · Python couldn't reach a DNS resolver
- java.net.UnknownHostException · Java couldn't resolve the hostname
- dial tcp: lookup example.com: no such host · Go couldn't resolve the hostname
- php_network_getaddresses: getaddrinfo failed · PHP couldn't resolve the hostname
- [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed · Python couldn't verify the server's certificate
- certificate verify failed: Hostname mismatch, certificate is not valid for · The certificate doesn't cover this hostname
- Max retries exceeded with url · requests gave up connecting to the URL
- requests.exceptions.ConnectTimeout · Python couldn't open the connection in time
- requests.exceptions.ReadTimeout · The server took too long to respond
- ConnectionRefusedError: [Errno 111] Connection refused · Nothing is listening on that port
- http.client.RemoteDisconnected: Remote end closed connection without response · The server closed the connection without replying