WPAD not loading: seven checks in the order the client makes them
When WPAD is not loading, one of seven things failed, and the client tries them in a fixed order. Many wpad issues sit in DNS, in the server's answer or in an old copy that the client still keeps. Go through the checks below in order; each one has the command, what a good and a bad answer look like, and what to do next.
WPAD, the Web Proxy Auto-Discovery Protocol, lets a client find the address of its PAC file (proxy
auto-configuration file) without being configured. The WPAD page explains the protocol and its
risks. This page goes through the checks when it does not work, in the order in which a client makes them.
The examples use the domain corp.example; put your own DNS suffix in its place.
The fast path: paste the curl output into the tester
Fetch the PAC file with curl on the affected machine and paste everything curl prints into the
online PAC file tester. The tester grades the file and the server’s answer together. You type the
commands yourself; nothing needs to be downloaded. Replace http://wpad.corp.example/wpad.dat with your own
PAC URL.
Each fetch uses three options. -v prints the request and the answer headers before the file, -sS hides
the progress meter but still shows errors, and --noproxy makes curl fetch the file directly even when the
environment variables http_proxy or https_proxy name a proxy. A PAC client also fetches its PAC file
directly, so you see the answer the client gets.
On Windows, in a Command Prompt
Windows 10 and 11 include curl.exe. This fetches the PAC file and prints the request, the answer headers
and the file:
curl.exe -sS -v --noproxy * http://wpad.corp.example/wpad.dat
Use a Command Prompt rather than PowerShell. In Windows PowerShell 5.1 the name curl starts a different
command, and curl’s own lines are shown as error messages when you redirect them.
These two lines save the file and show its first bytes in hexadecimal. FF FE or FE FF at the start
means that the file is stored as UTF-16, which Windows cannot read (PAC-D013).
EF BB BF is the UTF-8 byte order mark, which is harmless. A file that starts with the letters of
function is plain text:
curl.exe -sS --noproxy * -o wpad.tmp http://wpad.corp.example/wpad.dat
powershell -NoProfile -Command "Format-Hex wpad.tmp | Select-Object -First 1"
To see where Windows looks for the PAC file, read its settings. This shows the settings that Windows
services use (WinHTTP); look for AutoDetect and AutoconfigUrl:
netsh winhttp show advproxy
This shows the PAC URL set for the current user. “Unable to find the specified registry key or value” means that no PAC URL is set there:
reg query "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v AutoConfigURL
This shows the DNS suffixes that Windows adds to the name wpad. Read the lines Primary Dns Suffix,
DNS Suffix Search List and Connection-specific DNS Suffix:
ipconfig /all
This shows whether the name wpad resolves, and to which address:
nslookup wpad
On macOS, in Terminal
This fetches the PAC file and prints the request, the answer headers and the file. The second line shows
its first bytes: fffe or feff at the start means UTF-16, and efbb bf is the UTF-8 byte order mark:
curl -sS -v --noproxy '*' http://wpad.corp.example/wpad.dat
curl -sS --noproxy '*' http://wpad.corp.example/wpad.dat | xxd | head -1
To see where macOS looks for the PAC file, read its settings. This shows the system proxy settings; look for
ProxyAutoDiscoveryEnable, ProxyAutoConfigEnable and ProxyAutoConfigURLString:
scutil --proxy
This shows the DNS configuration; the lines search domain[0], search domain[1] and so on are the
suffixes that macOS adds to the name wpad:
scutil --dns
This prints the PAC URL from DHCP option 252, if the DHCP server sends one (use your interface name instead
of en0), and the last line shows whether the name wpad resolves:
ipconfig getoption en0 252
nslookup wpad
The two scutil options are described in Apple’s
scutil man page and
getoption in the ipconfig man page
(checked 2026-10-13).
On Linux, in a terminal
The fetch and the check of the first bytes are the same as on macOS:
curl -sS -v --noproxy '*' http://wpad.corp.example/wpad.dat
curl -sS --noproxy '*' http://wpad.corp.example/wpad.dat | xxd | head -1
To see where the system looks for the PAC file, read its settings. This shows whether a proxy is set in the environment; no output means that none is set:
env | grep -i _proxy
On a GNOME desktop, these show the proxy mode ('auto' means that a PAC file is used) and the PAC URL:
gsettings get org.gnome.system.proxy mode
gsettings get org.gnome.system.proxy autoconfig-url
This shows the DNS suffixes that the system adds to a short name like wpad (the search line) and the DNS
servers it asks, and the last line shows whether the name wpad resolves:
grep -E '^(search|domain|nameserver)' /etc/resolv.conf
nslookup wpad
Then paste the curl output
Paste the whole output of the curl -sS -v command into the online PAC file tester. You may
include the prompt line: the tester keeps the PAC file in the PAC field and moves the URL and the headers to
Delivery, where they are graded together with the file. Because curl -v shows the request lines, the
tester can also tell whether the server compressed the file without being asked
(PAC-D014). The other commands are for you to read; the tester does not
need their output.
If you prefer to check step by step, or the tester points at one step, read on.
The seven checks at a glance
| Check | Command | A good answer | Next step when it fails |
|---|---|---|---|
| Auto-detection is on | Windows Settings, netsh winhttp show advproxy, scutil --proxy | the auto-detect switch is on for the program that fails | Switch it on, or set an explicit PAC URL |
| The right engine does the search | chrome://net-internals/#proxy, chrome://policy | you know whether WinHTTP, Chrome or Firefox searches | Test with the program that fails |
| DHCP option 252 is present | capture, or ipconfig getoption en0 252 on macOS | the PAC URL, or no option on purpose | DHCP option 252 |
The name wpad resolves | nslookup wpad | your web server’s address from your own DNS server | The wpad DNS record |
| The HTTP answer is right | curl -sS --noproxy '*' -o /dev/null -D - http://wpad.corp.example/wpad.dat | 200 OK, under 1 MiB, no authentication | Fix the web server |
| The file runs | the tester | no errors, every URL gets an answer | Fix the script |
| No old result hides the fix | restart, reboot or change network | the client searches again | Reset the PAC cache |
Is auto-detection switched on?
Discovery only runs when “Automatically detect settings” (Windows, Chrome, Edge), “Auto-detect proxy
settings for this network” (Firefox) or “Auto proxy discovery” (macOS) is on. A policy may switch it off.
The page on automatic proxy detection shows where the switch is in each system.
If a setup script or a manual proxy is switched on as well, detection comes first and a wpad answer
replaces both; the page explains which setting wins when several are on.
Command. On Windows, the switch for browsers and desktop programs is in Settings > Network & internet > Proxy. Windows services use the separate WinHTTP setting:
netsh winhttp show advproxy
Where Windows answers that the command was not found, as Windows Server 2022 in its original release
does, use netsh winhttp show proxy, which shows only the static proxy. The JSON answer of
show advproxy has the fields AutoconfigUrl and AutoDetect (source: doc,
Microsoft netsh winhttp,
checked 2026-10-13). On macOS, scutil --proxy prints the current system proxy settings (source: code,
Apple scutil man page,
checked 2026-10-13).
Good (shortened):
"AutoDetect": true (Windows, WinHTTP)
ProxyAutoDiscoveryEnable : 1 (macOS)
Bad: "AutoDetect": false, or ProxyAutoDiscoveryEnable : 0, or the key is missing.
Next step. Switch it on for the program that fails, or better, give that program the PAC URL explicitly through policy. If a policy keeps switching it back, see PAC file not applied by Group Policy or Intune.
Which engine does the search: WinHTTP, Chrome or Firefox?
There is no single “WPAD” on a computer. Each engine searches on its own, with its own rules and its own
memory of the result: Windows services through WinHTTP, Chrome and Edge, Firefox and macOS each do their own
search. Which of them read DHCP option 252 and which look up the DNS name wpad is in the table
which client uses which method on the WPAD page.
Command. In Chrome or Edge, open chrome://net-internals/#proxy (in Edge edge://net-internals/#proxy)
and chrome://policy. The first shows the settings the browser really uses; the second shows whether a
company policy sets the proxy.
Good: the settings say auto-detect, and no policy sets another mode.
Bad: a policy sets pac_script, fixed_servers or direct, or an extension controls the proxy. Then
WPAD is not used at all in that browser.
Next step. Test with the program that really fails. A browser that finds the file says nothing about a Windows service, and the other way round. The Chrome and Edge page and the Windows 11 page cover each side.
Is DHCP option 252 present?
DHCP option 252 carries the PAC URL as a text string. It matters only for the clients that ask for it, as the table above shows: the browsers on macOS and Linux never read it.
Command. On macOS, ipconfig getoption en0 252 prints the option from the current lease (use your
interface name; source: code,
Apple ipconfig man page,
checked 2026-10-13). Windows has no built-in command that shows the option; a capture with Wireshark and the
filter dhcp.option.type == 252 shows it. On a Windows DHCP server,
Get-DhcpServerv4OptionValue -ScopeId 10.0.0.0 -OptionId 252 shows what the scope hands out.
Good:
http://wpad.corp.example/wpad.dat
Bad: nothing at all, a URL with a typing error, or a URL that points to a server the client cannot reach.
Next step. The page on DHCP option 252 shows how to set the option on Windows DHCP, ISC dhcpd, Kea and dnsmasq. If you do not use DHCP for this on purpose, go on to DNS.
Does the DNS name wpad resolve?
The browsers ask only for the single name wpad and leave it to the operating system to add the DNS
suffixes. Windows tries each suffix in its search list, and without a list it may also try the parent
domains, which Microsoft calls DNS devolution (PAC-D007).
Command, on the affected client:
nslookup wpad
Good:
Server: dns1.corp.example
Address: 10.0.0.10
Name: wpad.corp.example
Address: 10.0.0.20
Bad:
*** dns1.corp.example can't find wpad: Non-existent domain
or an answer from a public DNS server, or an address outside your network.
Next step. Create the record on your own DNS server. If the record exists and the name still does not
resolve, a Windows DNS server is probably blocking it: its global query block list answers “no such name”
for wpad even when a record exists. Read the list with dnscmd /info /globalqueryblocklist. The page on
the wpad DNS record explains the block list, the suffix list and devolution.
Does the HTTP answer come back correctly?
For DNS discovery the client fetches http://wpad.<domain>/wpad.dat: plain HTTP, port 80 and the file name
wpad.dat are fixed. A file that is only reachable over HTTPS or under another name is not found.
Command. Fetch it the way a client does: directly, not through a proxy, and without asking for compression. Chromium also fetches the PAC file without a proxy (source: code, pac_file_fetcher_impl.cc, checked 2026-10-13). On macOS and Linux:
curl -sS --noproxy '*' -o /dev/null -D - -w 'size %{size_download} bytes, %{time_total} s\n' http://wpad.corp.example/wpad.dat
In a Windows Command Prompt:
curl.exe -sS --noproxy * -o NUL -D - -w "size %{size_download} bytes, %{time_total} s\n" http://wpad.corp.example/wpad.dat
Good:
HTTP/1.1 200 OK
Content-Type: application/x-ns-proxy-autoconfig
Cache-Control: max-age=3600
Content-Length: 1834
size 1834 bytes, 0.012 s
Bad: any status other than 200, a WWW-Authenticate header, Content-Encoding: gzip although curl did
not ask for compression, a size above 1 MiB, or a time near 30 seconds.
What each of these does was measured for Windows (WinHTTP, Windows 11 25H2, source: lab, 2026-10-11) and read from the Chromium source code:
| What the server does | Windows (WinHTTP) | Chrome and Edge |
|---|---|---|
| Redirect to the file | followed, loads | followed |
| Status other than 200 (404, 500, also 203 or 204) | fails, 12167 | fails |
| Asks for a login (401, Basic or NTLM) | fails, 12015 (PAC-D012) | fails |
| File larger than about 1 MiB | fails, 12167 (PAC-D011) | fails above 1 MiB |
| Answer takes more than about 30 seconds | fails, 12167 | fails after 30 seconds |
| File saved as UTF-16 | fails, 12166 (PAC-D013) | reads it when it starts with a byte order mark |
| gzip-compressed although the client did not ask | fails, 12166 | not affected; the browser decodes it like any download |
https where the TLS connection fails, for example because of a certificate the client does not trust | fails, 12167 | fails |
file:// address | fails, 12006 | not supported (PAC-D009) |
Content-Type other than application/x-ns-proxy-autoconfig | loads, for a URL ending in .pac | loads; the type is not checked |
The Chromium column comes from pac_file_fetcher_impl.cc (checked 2026-10-13): it accepts only status 200, stops at 1 MiB and after 30 seconds, aborts on a login request or a certificate error, and logs a wrong content type without refusing the file. The meaning of the Windows error numbers is in Microsoft’s WinHTTP error messages: 12167 means the script could not be downloaded, 12166 that it could not be run, and 12015 that the login failed.
Next step. Make the server answer 200 OK directly, without a login, with a UTF-8 file under 1 MiB, and
compress only for clients that ask for it (PAC-D010,
PAC-D006). Paste the headers into the tester under Delivery
to have them graded.
Does the file parse and run?
A wpad.dat is an ordinary PAC file. A file that does not run makes clients go direct without a message.
Command. Paste the file into the online PAC file tester and press Check. Choose the engine profile of the client that fails, for example “Windows WinHTTP”.
Good: no errors, and the URLs you test get the proxy you expect.
Bad: “The PAC could not be loaded”, or findings such as a syntax error, a missing default return, or
newer JavaScript that Windows rejects (PAC-E001, PAC-X001,
PAC-K020). On Windows this shows as error 12166.
Next step. Fix the line the tester shows. For rules that send a URL to the wrong place, the PAC file troubleshooting page shows how to trace one URL through the file.
Is a cached result hiding the fix?
Every engine keeps the result of its last search and the last script it loaded. Windows also keeps a search that found nothing, until the computer’s IP address changes. So a client may go on failing for a while after you have fixed the record or the server.
Next step. Restart the browser, connect to another network or reboot Windows. The page on resetting the PAC cache lists what each engine keeps and how to clear it. If the client still fails after that, one of the earlier checks still fails.
Five common fixes that do not work
“Look up the wpad record at yourdomain.com.” Nobody asks for a name in that form. The browsers ask for the
single name wpad, and the operating system adds the DNS suffixes from its own list, so the names asked are
wpad.<suffix> for each suffix of the client, for example wpad.corp.example. On Windows, the suffix
search list and DNS devolution decide which names are tried. Run nslookup wpad on the client instead of
guessing the name.
“Run dnscmd /config /globalqueryblocklist to check the block list.” That command changes the list, and
it replaces every name in it with the names you give; without names it empties the list. You read the list
with dnscmd /info /globalqueryblocklist. To unblock wpad while keeping isatap blocked, run
dnscmd /config /globalqueryblocklist isatap; to switch the list off entirely, run
dnscmd /config /enableglobalqueryblocklist 0 (source: doc,
Microsoft: Remove a name from the global query block list,
checked 2026-10-13). The list is set per DNS server, so change it on every server.
“Run ipconfig /flushdns and the client looks again.” It empties only the DNS cache. The WinHTTP
Auto-Proxy service and the browsers keep their own copy of the discovery result and the script; the page on
resetting the PAC cache has the
details.
“Browsers check DHCP option 252.” Only some do. Programs that use WinHTTP or WinINet read it, Chrome and Edge read it on Windows and ChromeOS, and Firefox reads it only on Windows. On macOS and Linux, Chrome, Edge and Firefox look only in DNS. Apple documents that macOS itself asks DHCP for option 252, but Chrome, Edge and Firefox run their own search on macOS and do not use that answer.
“Serve the right MIME type or Windows will not load it.” In our measurements Windows (WinHTTP, Windows 11
25H2, 2026-10-11) loaded a file whose URL ended in .pac with no Content-Type, with text/html and with
application/javascript. Chromium and Firefox do not check the type either; Chromium only logs it (source:
code, pac_file_fetcher_impl.cc
and nsPACMan.cpp, checked
2026-10-13). The type still matters for a PAC URL without a known file ending: Microsoft wrote that WinHTTP
does not process a script unless the Content-Type is application/x-ns-proxy-autoconfig or the URL ends in
.js, .pac or .dat (source: doc,
Understanding web proxy configuration,
2013). Serve the right type anyway (PAC-D002), but do not expect it to fix a
WPAD problem.
When discovery works but the wrong proxy is used
Then the problem is in the file itself. The PAC file troubleshooting page sorts the causes by symptom, and the pages PAC file not working in Chrome or Edge and Proxy.pac ignored on Windows 11 cover the browser and the Windows side.
Frequently asked questions
Why is WPAD not loading?
One of seven steps fails. Auto-detection is switched off, the program uses another engine than you think, DHCP option 252 is missing, the DNS name wpad does not resolve, the server does not answer with status 200, the file does not run, or the client still uses an old result. Check them in that order. On Windows, a failed download shows as WinHTTP error 12167 and a search that found nothing as 12180.
What are the most common WPAD issues?
A wpad record that the Windows DNS server blocks with its global query block list, a URL that is only in DHCP option 252 while the browsers on macOS and Linux look only in DNS, a server that answers with a redirect to a login page or with authentication, and a client that still remembers that the last search found nothing.
Why is wpad.dat not found?
The client looks for the PAC URL in DHCP option 252 and by a DNS lookup of the name wpad in its own DNS suffix search list. If neither gives an answer, there is no PAC file. Check on the client that the name wpad resolves to your server and that http://wpad.<domain>/wpad.dat answers with status 200.
Which URL does WPAD fetch?
For DNS discovery the client fetches http://wpad.<domain>/wpad.dat over plain HTTP on port 80. The file name wpad.dat and the path are fixed; a file at another name or only over HTTPS is not found.