Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I want to apply proxy settings to a particular host only (e.g., www.apple.com) in Mac OS X. How can I do it?

In System Preferences there are only options for bypassing proxy settings for particular hosts.

share|improve this question

1 Answer 1

up vote 6 down vote accepted

You can use the following proxy.pac-file to sen all traffic to apple.com through the proxy while still going directly to all other hosts:

function FindProxyForURL(url, host) {

    // Apple.com via proxy
    if (shExpMatch(host,"*.apple.com")) {
        return PROXY;
    // Everything else directly!
    return "DIRECT";

Save this script as proxy.pac(Or any other name you like) somewhere in the filesystem.

Then go to the Network-part of the Systempreferences and go to the Further Options-Dailog of your Connection. There you can select the Proxies-Tab where you select the second entry on the left side ('Automatic Proxy-Configuration`) and select the proxy.pac-File you just created.

Voila! Your own proxy-configuration

For more information on the format of the proxy.pac-file have a look at http://de.wikipedia.org/wiki/Proxy_Auto-Config as starting point.

share|improve this answer
Thanks, this is exactly what I was looking for. –  Tushar Mathur Mar 13 '13 at 6:08

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.