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.
It depends on the proxy protocol you use. For HTTP/HTTPS proxies, your client typically resolves the target domain first, then connects to the proxy with that IP. For SOCKS5 proxies, you can instead configure remote DNS resolution so the proxy itself performs the lookup.
KnoxProxy does not block any target domains on its end -- you are free to request any URL through the gateway. If DNS fails, the actual cause is either a typo in the domain, a dead or expired domain, or your own local DNS resolver blocking the target.
Your browser may already have the DNS answer cached from a previous visit, or your proxy client may be configured to use a different, less reliable DNS resolver entirely. Clear your local DNS cache and verify resolution with nslookup run from the exact same machine that runs your proxy client.
KnoxProxy comes pre-configured to avoid the most common errors. Get started and fix DNS_PROBE_FINISHED for good.