Zscaler PAC File: How It Works, Where It's Hosted, and Why an On-Device Proxy Doesn't Need One (2026)

Quick answer: A Zscaler PAC file is a proxy auto-configuration file that tells a browser, or Zscaler Client Connector, which web traffic to send to a Zscaler Public Service Edge and which to send direct. Zscaler hosts four default PAC files for every organization, and you can upload custom ones with Zscaler-specific variables like ${GATEWAY} that pick the nearest data center. A PAC file only exists to point traffic at a proxy somewhere else on the network, so an on-device proxy, which runs on the laptop itself, doesn't need one.
This guide covers how Zscaler PAC files work, where they're hosted, how Client Connector uses them, and their documented limits. Every Zscaler claim links to Zscaler's help pages. We make dope.security, an on-device secure web gateway, so read the comparison sections with that in mind.
Last updated: November 2026
What is a PAC file?
Zscaler's Understanding PAC Files defines it as "a text file that instructs a browser to forward traffic to a proxy server instead of directly to the destination server."
Every PAC file is built around one function. Per Zscaler's guide to writing a PAC file, it must start with FindProxyForURL(url, host), and each rule returns one of two answers:
PROXYsends the request to a proxy, such as a Zscaler Public Service Edge.DIRECTsends the request straight to the destination.
A minimal Zscaler PAC file looks like this:
function FindProxyForURL(url, host) {
if (dnsDomainIs(host, "mail.domain.com")) return "DIRECT";
return "PROXY ${GATEWAY}:80; PROXY ${SECONDARY_GATEWAY}:80; DIRECT";
}
For the general picture of explicit and transparent proxies, see what a forward proxy is.
How does a Zscaler PAC file work?
When a browser is set to use Zscaler's default PAC file, Zscaler describes four steps:
- The browser requests the PAC file.
- Zscaler uses geolocation to find the Public Service Edges closest to the user.
- Zscaler inserts those Public Service Edge IP addresses into the PAC file it returns.
- The browser follows the file and forwards its web traffic to the primary Public Service Edge.
The geolocation step runs through two variables. Zscaler recommends ${GATEWAY} and ${SECONDARY_GATEWAY} instead of hard-coded IPs, which it discourages "because they can change at any time." The secondary gateway is the failover. Those variables only work if Zscaler hosts the file.
Zscaler's PAC writing guide says Public Service Edges accept web requests on ports 80, 443, 9400, 9443, and 9480.
Where is the Zscaler PAC file hosted?
In Zscaler's cloud, by default. Zscaler hosts four default PAC files: recommended.pac, proxy.pac, mobile_proxy.pac, and kerberos.pac. All four forward browser traffic to the nearest Public Service Edge. They can't be edited, but you can copy one as the starting point for a custom file. Zscaler recommends deploying recommended.pac, and the Kerberos file if you use Kerberos authentication.
To find the URL, go to Infrastructure > Internet & SaaS > Hosted PAC Files in the Zscaler Admin Console, copy the Hosted URL, and distribute it to users. Zscaler supports HTTP and HTTPS for PAC URLs and recommends HTTPS.
You can also host a PAC file yourself. Zscaler notes PAC files can live "on a workstation, on an internal web server, or on a server outside the corporate network," though you lose the Zscaler variables.
Custom hosted PAC files come with documented limits, from Using Custom PAC Files:
| Limit | Default | With Zscaler Support |
|---|---|---|
| PAC files per organization | 256 | 1,024 |
| Size per PAC file | 256 KB | 2 MB |
| Versions per PAC file | 10 | Not listed |
| Staged versions | 1 at a time | Not listed |
Two warnings from the same page are worth pinning to the wall. "PAC file changes immediately impact your organization's traffic." And turning URL obfuscation on or off after saving changes the Hosted URL, so users still on the old URL get the default PAC file instead of yours until you redistribute it.
How does Zscaler Client Connector use PAC files?
Client Connector uses two of them. Per Zscaler's best practices for PAC files with Client Connector:
- The Forwarding Profile PAC directs system, browser, and application traffic to Client Connector.
- The App Profile PAC tells Client Connector where to send that traffic in the Zscaler cloud, using the closest data center.
What the Forwarding Profile PAC does depends on the forwarding mode, from Configuring Forwarding Profiles:
| Client Connector mode | How traffic is captured | Role of the Forwarding Profile PAC |
|---|---|---|
| Tunnel | IP routes at the network layer; port 80/443 traffic goes through Z-Tunnel | Only bypasses, or catching extra traffic like web on port 8080 |
| Tunnel with Local Proxy | Client Connector installs a PAC file that sends proxy-aware traffic to a local listener | Required; must return PROXY ${ZAPP_LOCAL_PROXY} |
| Enforce Proxy | System proxy settings, no tunnel | Enforced on the device, which Zscaler compares to a GPO pushing a PAC file |
Z-Tunnel 1.0 forwards traffic "via CONNECT requests, much like a traditional proxy," and sends proxy-aware or port 80/443 traffic only. Z-Tunnel 2.0 uses DTLS or TLS and is "capable of sending all ports and protocols." For non-web traffic, Zscaler's traffic forwarding guide says PAC files can't use features like Firewall "because you need tunneling to use them."
In our view, one sentence in Zscaler's docs explains much of the confusion around PAC files. In Tunnel with Local Proxy mode, Zscaler writes: "If traffic does not follow the Forwarding Profile PAC file, it does not reach Zscaler Client Connector and the Zscaler cloud. Instead, the traffic is sent directly." We cover where bypasses should live in Zscaler Client Connector troubleshooting.
What are the limits of a Zscaler PAC file?
Credit where it's due: a PAC file is simple, works in every major browser, and follows a user off the corporate network. But Zscaler's own traffic forwarding guide lists real limitations for PAC-only forwarding:
- No Firewall or Bandwidth Control. Zscaler says you can't use them with PAC files "because you need tunneling to use them." See Zscaler Cloud Firewall for that side.
- Not every app reads it. "Not all applications support PAC files, therefore not all traffic is secured by Zscaler."
- Users can turn it off. "End users can bypass the Zscaler service by disabling PAC files." Zscaler advises keeping admin rights away from users.
- Less visibility. Without XFF headers, Zscaler loses internal IP addresses and sublocation policies. Without Surrogate IP, users re-authenticate in each new browser.
- Government clouds. Zscaler Government Clouds support PAC files only through GRE or IPsec tunnels.
The writing best practices add operational ones. PAC files "can be downloaded and viewed by anyone," so they shouldn't hold anything sensitive. They run serially, so long exclusion lists and DNS lookups like dnsResolve() and isInNet() slow every request. And Zscaler tells admins to put SSL exceptions in the Admin Console, not in the PAC file.
Zscaler PAC file best practices
If you run Zscaler PAC files today, Zscaler's guidance comes down to this:
- Start from a copy of a default PAC file, not a blank page.
- Use
${GATEWAY}and${SECONDARY_GATEWAY}, never hard-coded Public Service Edge IPs. - Edit in a plain text editor. Smart quotes from a word processor break the file.
- Put high-probability rules, like private IP ranges, at the top.
- Keep SSL inspection exemptions in the Admin Console.
- Test with pactester and Verify PAC File, then stage the version.
- Roll changes to a small group of users first. Zscaler recommends this "to prevent outages."
Why doesn't an on-device proxy need a PAC file?
A PAC file answers one question: where is the proxy? With an appliance or a cloud proxy, the proxy lives somewhere else on the network, so every browser and app needs a file, a route, or a tunnel to find it. The on-device proxy, which dope.security calls the third generation, moves the proxy onto the laptop. There's no remote address to point at, so there's nothing for a PAC file to say.
That's how dope.swg works. "We moved the Secure Web Gateway from the stopover data center to the endpoint." The dope.endpoint has two parts that matter here, per dope.security's documentation. A Redirector re-routes traffic to a local Proxy. On Windows the Redirector is a driver that uses Microsoft's Windows Filtering Platform. On Mac it's a network extension. The Proxy then performs SSL inspection and URL filtering on the device, and traffic flies direct to its destination with no stopover data centers. That's the Fly-Direct Architecture.
In practice, that changes what you maintain:
- dope.security's deployment doesn't use a PAC file. There's no PAC file to host, version, or redistribute. The Mac MDM profile grants the network extension and VPN permissions "for re-routing traffic to the on-device proxy."
- No tunnel to a data center and no roaming client.
- Bypasses live in the policy, not in JavaScript. URL and application bypass lists sit in dope.console. dope.security also ships a default bypass list of apps and domains known to break under inspection, so not every destination is decrypted.
- Breakage shows up on its own. The endpoint reports SSL errors by app and by URL, and an admin can add either to the bypass lists for all policies from the notifications view.
- Anti-tamper is an option. With anti-tamper enabled, users can't simply switch it off: disabling or uninstalling requires the anti-tamper password.
Honest limits: dope.security runs on Mac and Windows devices with the endpoint installed. It doesn't cover phones. dope.swg doesn't inspect non-web ports or protocols. dope.security doesn't include SD-WAN or ZTNA today. If you need cloud firewalling for non-web traffic, Zscaler documents that Z-Tunnel 2.0 can send "all ports and protocols" and that its cloud firewall controls outbound TCP, UDP, and ICMP traffic. dope.swg doesn't cover that.
Zscaler PAC file vs. Client Connector vs. an on-device proxy
dope.security wrote this comparison. Zscaler cells come from the Zscaler pages linked above.
| On-device proxy (dope.swg) | Zscaler PAC file only | Zscaler Client Connector (Z-Tunnel 2.0) | |
|---|---|---|---|
| Where inspection happens | On the device | Zscaler Public Service Edge | Zscaler Public Service Edge |
| PAC file needed | No | Yes | App Profile PAC; Forwarding Profile PAC depends on mode |
| Apps that ignore proxy settings | The Redirector re-routes traffic to the on-device proxy | Zscaler: "Not all applications support PAC files" | Tunnel mode captures traffic with IP routes; Z-Tunnel 2.0 can send all ports and protocols |
| Non-web traffic | No | No | Yes, all ports and protocols |
| User can turn it off | Not when the anti-tamper password is enabled | Yes, by disabling the PAC file | Can be configured to prevent it |
| Where bypasses live | dope.console bypass lists | PAC file | PAC files, SSL exemptions, and other lists |
| Platforms | Mac and Windows | Major browsers | Windows, macOS, Linux, iOS, Android |
Should you still use a Zscaler PAC file?
If you run Zscaler, yes, in the places Zscaler designs it for. Zscaler itself recommends a combination of tunnels, PAC files, Surrogate IP, and Client Connector, not PAC files alone. Our suggestion: use the PAC file as a fallback for browsers and to carry bypasses, and use Client Connector with Z-Tunnel 2.0 for remote laptops.
If the PAC file is the part you're tired of maintaining, ask whether the proxy needs to be remote at all. We walk through that path in ZIA architecture, explained and Zscaler Client Connector vs. an on-device endpoint.
Email sales@dope.security and we'll set up a walkthrough.
Frequently asked questions
What is a PAC file in Zscaler?
A Zscaler PAC file is a proxy auto-configuration file that tells a browser or Zscaler Client Connector which web traffic to send to a Zscaler Public Service Edge and which to send direct. It's JavaScript built around the FindProxyForURL function, and Zscaler-hosted files can use variables like ${GATEWAY} to pick the nearest data center.
Where is the Zscaler PAC file located?
Zscaler hosts PAC files in its cloud. In the Zscaler Admin Console, go to Infrastructure > Internet & SaaS > Hosted PAC Files and copy the Hosted URL. You can also host a PAC file on your own web server, but Zscaler's variables only work in Zscaler-hosted files.
What is the default Zscaler PAC file?
Zscaler hosts four default PAC files: recommended.pac, proxy.pac, mobile_proxy.pac, and kerberos.pac. Zscaler recommends deploying recommended.pac. The defaults can't be edited, but you can copy one to build a custom PAC file.
Does Zscaler Client Connector use a PAC file?
Yes. Client Connector uses a Forwarding Profile PAC to direct traffic to Client Connector and an App Profile PAC to send that traffic to the Zscaler cloud. In Tunnel with Local Proxy mode, the Forwarding Profile PAC is required; in Tunnel mode, it's used mainly for bypasses.
Can a Zscaler PAC file forward non-web traffic?
No. Zscaler says PAC files can't use features like Firewall and Bandwidth Control because those need tunneling. For non-web traffic from remote users, Zscaler uses Client Connector with Z-Tunnel 2.0, which can send all ports and protocols.
Does dope.security use a PAC file?
No. dope.swg runs the proxy on the device, and the dope.endpoint's Redirector re-routes traffic to it locally, so there's no remote proxy address for a PAC file to point to. dope.security runs on Mac and Windows devices with the endpoint installed, doesn't cover phones, and doesn't inspect non-web ports or protocols.



