Getting DNS_PROBE_FINISHED? Here’s why it happens and the exact fix.
You are seeing DNS_PROBE_FINISHED_NXDOMAIN because the DNS lookup for the target domain failed through the proxy. The fix: verify the target URL spelling, check if the domain exists, and ensure the proxy DNS resolver is not being blocked.
Check the domain spelling. Copy-paste the URL into a browser to confirm it resolves.
Run nslookup <domain> to verify your local DNS can resolve the target.
For SOCKS5 proxies, enable remote DNS so the proxy resolves the domain instead of your client.
Verify your proxy gateway hostname resolves: nslookup gw.knoxproxy.com.
import requests
import socket
proxy = "http://USER:PASS@gw.knoxproxy.com:7000"
target = "target.example.com"
# Pre-validate DNS before sending through proxy
try:
socket.gethostbyname(target)
except socket.gaierror:
print(f"DNS failed for {target} -- check spelling")
exit(1)
r = requests.get(f"https://{target}/api", proxies={"https": proxy})
print(r.status_code) # 200Test your setup with our proxy checker, then contact support if DNS_PROBE_FINISHED still won’t clear.
DNS_PROBE_FINISHED_NXDOMAIN means the DNS resolver could not find the target domain. When using proxies, DNS resolution can happen in two places: your client resolves the domain before connecting to the proxy (local DNS), or the proxy resolves it (remote DNS). If either DNS resolver cannot find the domain, you get this error. The most common causes are typos in the target URL and domains that have expired or been taken down.
Fix the domain name in your target URL.
If the domain was recently taken down, there is no fix. Remove it from your target list.
Use a public DNS resolver (8.8.8.8 or 1.1.1.1) or configure your proxy to use remote DNS resolution.
DNS failures are almost always caused by wrong domain names or local network issues. If your DNS is correct and the domain exists but the proxy still fails to resolve it, contact KnoxProxy support.
For HTTP/HTTPS proxies, your client typically resolves the domain first, then connects to the proxy. For SOCKS5 proxies, you can configure remote DNS resolution so the proxy does it.
KnoxProxy does not block any target domains. If DNS fails, the issue is either a typo, a dead domain, or your local DNS resolver blocking the target.
Your browser may have the DNS cached, or your proxy client may use a different DNS resolver. Clear DNS cache and verify with nslookup from the same machine running the proxy client.
KnoxProxy comes pre-configured to avoid the most common errors. Start a free trial and fix DNS_PROBE_FINISHED for good.