# Create a PAC file online: the PAC file generator

Source: https://findproxyforurl.net/generate/ · last updated 2026-10-14

## Create a PAC file in three steps

1. **List your proxies** in the order clients should try them, for example the proxy in your
   main data centre first and the one in the second data centre after it.
2. **List what goes direct**: your internal domains, single hosts such as a partner portal, and
   your own networks. Add a comment after `#` to any line, so that the next person knows why it
   is there.
3. **Download the file and test it.** The generator writes the file as you type. "Open in
   checker" runs it in the engine profile you choose (Chromium, Firefox, pacparser, or Windows WinHTTP
   or WinINet) and grades it.

The form on https://findproxyforurl.net/generate/ builds the file in the browser.

## Put the file on a web server

Serve the file over HTTPS from a server you control, with the content type
`application/x-ns-proxy-autoconfig` and a short cache lifetime such as
`Cache-Control: max-age=3600`. Browsers do not insist on the content type, but a wrong one often
means the server returns an error page instead of the file. In the checker, paste the output of
`curl -sI https://pac.corp.example/proxy.pac` under "Delivery" to grade how the file is served.
Roll a new version out to a pilot group first, and keep the previous version at hand so that you
can switch back quickly.

## Set the PAC file's URL on the clients

- **Windows 10 and 11:** Settings → Network & internet → Proxy → "Use setup script" → Set up.
  Turn on "Use setup script", enter the file's URL as the script address, and save. Edge and
  Chrome follow this Windows setting unless a browser policy sets their own.
- **macOS:** System Settings → Network → select the network service → Details → Proxies. Turn on
  "Automatic proxy configuration" and enter the file's URL.
- **Group policy, for the Windows setting:** User Configuration → Preferences → Control Panel
  Settings → Internet Settings → New → "Internet Explorer 10" (this item also applies to later
  versions). On the Connections tab, open the LAN settings and set "Use automatic configuration
  script" with the file's URL.
- **Group policy, for Edge and Chrome:** the policy "Proxy settings" (`ProxySettings`) with
  `"ProxyMode": "pac_script"` and `"ProxyPacUrl"` set to the file's URL. It overrides the
  Windows setting for the browser.
- **Firefox:** Settings → Network Settings → "Automatic proxy configuration URL", or the
  enterprise policy `Proxy` with `Mode` set to `autoConfig` and `AutoConfigURL` set to the URL.

A configured URL like this is safer than automatic discovery. If clients have to find the file on
their own, name it `wpad.dat`; the [wpad.dat generator](https://findproxyforurl.net/generate/wpad-dat/) and the
[WPAD page](https://findproxyforurl.net/wpad/) explain how discovery works and how to keep it safe.

## What the generated file does

1. It lower-cases the host, so that `WIKI.Corp.Example` and `wiki.corp.example` take the same route.
2. It sends plain host names, your hosts and domains, and (for IP-address URLs only) private and
   listed networks direct, cheapest test first. Nothing in the file resolves a name, so no request
   waits for DNS.
3. It sends everything else to your proxies in the order you listed them, with a comment on the
   default route: the line that decides every request nothing else matched.

There is no `DIRECT` at the end of the proxy list unless you ask for it. A proxy.pac is for routing,
not for security, but a silent fail-open should be a decision, not a default.

## Ready-made files are on the examples page

The [PAC file examples](https://findproxyforurl.net/examples/) are complete files for common cases, from one proxy for
everything to failover and SOCKS, and the [annotated reference proxy.pac](https://findproxyforurl.net/examples/reference/)
explains why each block of a production file is where it is.

## Using a security service edge?

A security service edge (SSE) is a cloud service that inspects web traffic. The
[SSE builders](sse/) produce files for Zscaler, Netskope, Skyhigh Security, Cloudflare Gateway and
Prisma Access that follow each vendor's documentation; the checker rates them with the vendor pack.


## Frequently asked questions

### How do I create a PAC file with this generator?

Enter your proxies in failover order and the hosts, domains and networks that must not use them, and the generator on this page writes the proxy.pac. To write one by hand, follow the article on how to create a PAC file.

### Is this PAC file generator free, and is my input sent anywhere?

It is free. The file is built in your browser, and nothing is sent anywhere until you open it in the checker. The checker, too, sends only the file's logical shape for the grade, with no names, no addresses from your network and no text.

### Which MIME type does a PAC file need?

application/x-ns-proxy-autoconfig. Most browsers also accept other types, but serving the right one shows that the server is set up for the file and is not returning an error page.

### How do I make all clients use the PAC file?

Set its URL centrally, through group policy on Windows, a configuration profile (MDM) on macOS, or the browser policies of Edge, Chrome and Firefox. Automatic discovery through WPAD works without configuration but is less safe.

### Can I generate a PAC file for Zscaler, Netskope or another cloud proxy?

Yes. The SSE builders produce files for Zscaler, Netskope, Skyhigh Security, Cloudflare Gateway and Prisma Access that follow each vendor's documentation.



- [proxy.pac and wpad.dat with a security service edge (SSE)](https://findproxyforurl.net/generate/sse/index.md): When a PAC file is the right way to reach Zscaler, Netskope, Skyhigh, Cloudflare or Prisma Access, how it works with the vendor's agent, and a builder for each.
- [wpad.dat generator: create the file for WPAD discovery](https://findproxyforurl.net/generate/wpad-dat/index.md): Create a wpad.dat file online for Web Proxy Auto-Discovery, then serve it where DHCP option 252 or the DNS lookup for wpad finds it, with the right MIME type.
