# isResolvable used as a reachability test

Source: https://findproxyforurl.net/rules/isresolvable-usage/ · last updated 2026-10-14

Rule PAC-P003 (`isresolvable-usage`), severity medium, category: Performance.

isResolvable makes the route depend on DNS: the first request to a name waits, and every request waits for a timeout where DNS cannot be reached. It also answers another question than "can I reach this host directly"; resolvable hosts can be unreachable, and the reverse.

## Why it matters

The usual intent is "if the name resolves internally, go direct". That couples routing to
the resolver (latency, outages, split-horizon surprises, poisoning) and is wrong on
networks where every public name resolves too. The question "is this an internal host" is
answered reliably by its domain suffix, not by whether the resolver knows it.


## How to fix

Use domain suffix rules (dnsDomainIs(host, ".corp.example")) or isPlainHostName instead of isResolvable.

## Bad

```js
function FindProxyForURL(url, host) {
  if (isResolvable(host)) {
    return "DIRECT";
  }
  return "PROXY proxy.corp.example:8080";
}
```

## Good

```js
function FindProxyForURL(url, host) {
  if (isPlainHostName(host) || dnsDomainIs(host, ".corp.example")) {
    return "DIRECT";
  }
  return "PROXY proxy.corp.example:8080";
}
```
