# PAC file not working in Chrome or Edge: causes and fixes

Source: https://findproxyforurl.net/articles/pac-file-not-working-chrome-edge/ · last updated 2026-10-12

When Chrome or Edge does not use your PAC file, the cause is usually one of three things. Another setting wins over the file, the file fails while it runs, or it runs but never sees what you test for. This page goes through them in the order that finds the cause fastest.

## The usual causes at a glance

| What you see | Likely cause | Check or fix |
|---|---|---|
| No PAC URL in `chrome://net-internals/#proxy` | A policy, an extension or the system settings decide | `chrome://policy`; switch off proxy extensions; check the system proxy settings |
| Everything goes direct, no error | The PAC file cannot be downloaded, or the script fails | Open the PAC URL in a tab; paste the file into the [tester](https://findproxyforurl.net/check/) |
| A PAC file on a file path does nothing | Chrome does not load `file://` PAC URLs | Serve the file from a web server |
| A rule on the path of an https URL never matches | Chrome passes only `https://host:port/` | Decide on `host` |
| It works in Chrome but not in Firefox or Windows programs | `console.log()`, lower-case keywords | Check the file with each engine profile in the tester |
| A change does not show up | The PAC file is cached | Re-apply the settings in net-internals or restart the browser |

A PAC file (proxy auto-configuration file, often `proxy.pac` or `wpad.dat`) is a small JavaScript
program that the browser runs for every request to choose a proxy. Chrome and Edge are both built on
Chromium, so everything on this page applies to both. When something goes wrong, the browser shows no
error. Traffic simply goes direct or to the wrong proxy.

## Check first which proxy settings Chrome really uses

Open `chrome://net-internals/#proxy` (in Edge `edge://net-internals/#proxy`). It shows the effective
settings and has a button to re-apply them after a change *(expert)*. If no PAC URL is listed there,
the file is not the problem; something else decides.

**A policy wins over everything.** When a company policy sets the proxy mode, users cannot change the
proxy settings, and Chrome ignores proxy options on the command line (source: doc, Chromium policy
definition
[ProxyMode](https://chromium.googlesource.com/chromium/src/+/main/components/policy/resources/templates/policy_definitions/Proxy/ProxyMode.yaml),
checked 2026-10-12). The modes are `direct`, `auto_detect`, `system`, `fixed_servers` and
`pac_script`. Open `chrome://policy` to see whether such a policy is set *(expert)*.

**An extension can replace the settings.** VPN and proxy extensions set the browser's proxy through
the extension API, and the effective settings "can be determined by another extension or by a policy"
(source: doc, [chrome.proxy](https://developer.chrome.com/docs/extensions/reference/api/proxy),
checked 2026-10-12). Switch such extensions off while you test.

**Otherwise Chrome follows the system.** On Windows and macOS, Chrome and Edge use the proxy settings
of the operating system. The page [PAC file ignored on Windows 11](https://findproxyforurl.net/articles/pac-file-ignored-windows-11/)
covers the Windows side, including VPN connections, which have their own proxy settings.

## The file cannot be loaded, so Chrome connects directly

When Chromium cannot fetch the PAC file, it connects directly, unless a policy marks the PAC as
mandatory (source: code, verified 2026-10-04). Then it stops with
`ERR_MANDATORY_PROXY_CONFIGURATION_FAILED`. Check these points:

- **Open the PAC URL in a tab.** It must answer with status 200 and the file, not with a login page or
  a redirect ([PAC-D010](https://findproxyforurl.net/rules/http-error-status/)).
- **No file paths.** Chrome no longer accepts `file://` PAC URLs. The setting then does nothing in
  Chrome and Edge, while some Windows programs may still use it ([PAC-D009](https://findproxyforurl.net/rules/pac-from-file-share/)).
- **The right content type** helps other clients: `application/x-ns-proxy-autoconfig`
  ([PAC-D002](https://findproxyforurl.net/rules/wrong-content-type/)).

## The file loads but fails, so Chrome connects directly

A syntax error, an exception or a missing `return` also make Chromium go direct (source: code,
verified 2026-10-04). Paste the file into the [online PAC file tester](https://findproxyforurl.net/check/) and press **Check**.
It parses the file, runs it for a set of test URLs in the Chrome profile and lists every problem with
its line, for example a call to a function that does not exist
([PAC-E006](https://findproxyforurl.net/rules/runtime-exception/)) or a path without a `return`
([PAC-X001](https://findproxyforurl.net/rules/no-default-return/)).

## The file runs, but a rule never matches in Chrome

Trace the failing address in the tester: the Path tab shows each test as true or false and the line
that decided. Three causes are specific to Chrome:

- **https addresses arrive without path and query.** For `https://` URLs Chrome passes only
  `https://host:port/` to the script, and a user name and password before the host are removed for
  every scheme (source: lab, Chromium 145 and Edge 155, 2026-10-12). A rule on the path of an https
  URL never matches ([PAC-K021](https://findproxyforurl.net/rules/url-path-decision/)). Decide on `host` instead.
- **The pattern matches more or less than you think.** `shExpMatch(host, "*corp.example")` also
  matches `evilcorp.example`, and `dnsDomainIs(host, "corp.example")` without a leading dot does the
  same ([PAC-X004](https://findproxyforurl.net/rules/shexpmatch-leading-asterisk-without-dot/),
  [PAC-X003](https://findproxyforurl.net/rules/dnsdomainis-without-leading-dot/)).
- **The rule depends on the user's network.** `myIpAddress()` returns another address at home, in the
  office and on VPN ([PAC-K013](https://findproxyforurl.net/rules/myipaddress-usage/)). Enter the user's address as the client IP
  in the tester.

## It works in Chrome but not in Firefox or Windows programs

Chrome is the most forgiving engine. `console.log()` works in Chrome but throws in Firefox and in
Windows programs, where `console` is not defined (source: lab, Firefox 157 and Windows 11,
2026-10-11 and 2026-10-12; [PAC-K022](https://findproxyforurl.net/rules/console-in-pac/)). Lower-case keywords such as
`"proxy p.corp.example:3128"` work in Chrome, but Windows ignores the entry
([PAC-E011](https://findproxyforurl.net/rules/invalid-return-value/)). The tester has a profile for each engine; check the file
in each one your users have.

## A change does not show up

Chrome keeps the downloaded file for a while. Without a `Cache-Control` header the engine decides how
long ([PAC-D003](https://findproxyforurl.net/rules/missing-cache-control/)). While testing, start a separate profile with
`--proxy-pac-url` and restart it after each change. The article
[Debugging a PAC file in Chrome, Edge and Firefox](https://findproxyforurl.net/articles/debug-pac-chrome-edge-firefox/) shows the
flags and how to read a NetLog, which records the PAC download, the proxy list for each request and
`alert()` messages.

The general [PAC file troubleshooting](https://findproxyforurl.net/articles/pac-file-troubleshooting/) page sorts all other
symptoms, including slow pages and the proxy itself failing.


## Frequently asked questions

### Why does Chrome ignore my proxy.pac?

Either another setting wins over the PAC file, or the file fails. A Chrome policy for the proxy settings, or an extension that controls the proxy, replaces the system settings. If the file cannot be downloaded or throws an error, Chrome connects directly without a message. chrome://net-internals/#proxy shows the settings Chrome really uses; the tester at findproxyforurl.net/check/ shows whether the file runs.

### Why does Chrome go direct although a PAC file is set?

Chrome connects directly when it cannot fetch the PAC file, when the script throws an exception, and when it returns nothing. Only when the PAC is marked as mandatory does Chrome stop with ERR_MANDATORY_PROXY_CONFIGURATION_FAILED instead.

### Can Chrome load a PAC file from a file path?

No. Chrome no longer accepts file:// PAC URLs, so such a setting does nothing in Chrome and Edge, while some Windows programs may still use it. Serve the file from a web server.

### Why does my rule on the URL path not match in Chrome?

For https addresses Chrome passes only https://host:port/ to the script; the path and the query are removed. A rule that looks at the path of an https URL never matches.

