Skip to content

Configure a PAC file on your device

After you create a proxy endpoint and create a PAC file, configure your devices to use the PAC file URL. You can configure system-level proxy settings (which apply to most browsers) or configure individual browsers separately.

Chromium-based browsers (Google Chrome, Microsoft Edge, Brave) and Safari use the operating system proxy settings. Firefox uses its own proxy settings by default and must be configured separately.

Prerequisites

Before you configure a PAC file on your device, make sure you have:

Configure system proxy settings

Configure your operating system to use the PAC file. This applies the proxy to all browsers that use system proxy settings (Chrome, Edge, Brave, Safari).

For more information, refer to Use a proxy server in Windows.

  1. Open the Settings app and select Network & internet > Proxy.
  2. Next to Use setup script, select Set up.
  3. In the Edit setup script dialog, turn on Use setup script.
  4. In the Script address field, enter your PAC file URL.
  5. Select Save.

Configure Firefox separately

Firefox uses its own proxy settings and does not inherit the operating system proxy configuration by default. To configure Firefox to use your PAC file:

  1. In Firefox, go to Settings and scroll to Network Settings.
  2. Select Settings.
  3. Select Automatic proxy configuration URL.
  4. Enter your PAC file URL (for example, https://pac.cloudflare-gateway.com/<account-id>/<slug>).
  5. Select OK.

HTTP traffic from Firefox is now filtered by Gateway.

Deploy PAC files at scale

For enterprise environments, you can deploy PAC file configurations to managed devices using Group Policy, MDM, or browser management tools.

Windows Group Policy (GPO)

You can deploy the PAC file URL through Group Policy by configuring the Internet Settings preference:

  1. Open Group Policy Management and create or edit a Group Policy Object.
  2. Go to User Configuration > Preferences > Windows Settings > Registry.
  3. Add a registry item with the following values:
    • Hive: HKEY_CURRENT_USER
    • Key path: Software\Microsoft\Windows\CurrentVersion\Internet Settings
    • Value name: AutoConfigURL
    • Value type: REG_SZ
    • Value data: Your PAC file URL

Microsoft Intune

Use the Settings Catalog to deploy proxy auto-configuration:

  1. In the Microsoft Intune admin center, create a new Configuration profile.
  2. Select Settings catalog as the profile type.
  3. Search for Proxy and configure the auto-config URL setting for your target platform (Windows or macOS).
  4. Assign the profile to your device groups.

Apple MDM (Jamf Pro, Jamf School, other MDM)

Deploy a configuration profile with the proxy payload:

  1. Create a new configuration profile in your MDM solution.
  2. Add a Global HTTP Proxy or Network payload.
  3. Set the proxy type to Auto and enter your PAC file URL.

For detailed payload settings, refer to the Network Proxy Configuration settings in the Apple Platform Deployment guide.

Google Admin console (ChromeOS)

For managed ChromeOS devices and Chrome browsers:

  1. In the Google Admin console, go to Devices > Networks.
  2. Select the organizational unit for your managed devices.
  3. Add or edit a network configuration (Wi-Fi or Ethernet).
  4. Under Proxy settings, select Automatic proxy configuration.
  5. Enter your PAC file URL.
  6. Select Save.

For more information, refer to Set up networks for managed devices.

Chrome Browser Cloud Management

To deploy proxy settings to managed Chrome browsers on any operating system:

  1. In the Google Admin console, go to Devices > Chrome > Settings.
  2. Select the organizational unit for your managed browsers.
  3. Search for Proxy and configure the Proxy mode to Use a .pac proxy auto-config file.
  4. Enter your PAC file URL.
  5. Select Save.

Verify your configuration

After you configure a PAC file on your device, verify that traffic routes through Gateway:

  1. Open a browser on the configured device.
  2. Create an HTTP policy to block a test domain (for example, example.com).
  3. Visit the blocked domain in your browser.
  4. Verify that the Gateway block page appears.

If the block page does not appear, refer to the PAC file troubleshooting section for debugging steps.

Next steps