Page 1 of 1

Autodetect of proxy config in IE

PostPosted: Wed May 03, 2006 2:40 pm
by goat
Here's the quick, simple way of getting autoconfig to work with IE.
First, make sure the client computer is setup with the correct search
domain, either manually, or preferrably from DHCP. For example, Go into the configuration of IE and
checkmark Autodetect proxy. Make sure no other settings are checked.
IE is hardcoded to look for a web server called wpad, so if you have
already have a webserver, say, at, create
a CNAME (alias in MS speak) entry called wpad that points to Now, make a copy of your proxy.pac file,
rename it wpad.dat (I symlink mine to the proxy.pac), and put it in
the default root directory of the web server. The sequence of events
goes like this.

IE is started.
IE determines that the local clients primary search domain is
IE attempts to download the file
If successful, IE autoconfigures and brings up the default web page.
If it fails, IE truncates the search domain by 1, then attempts to
download the file
If this fails, IE then attempts to connect directly.

The nice thing about this is that if you have control of the DNS
entries for the two domains that it searches, you can point the CNAME
entries to two separate webservers. That gives you redundancy in case
the first webserver goes down.

I usually setup apache on my proxy server to serve out the banned
pages and other proxy related information. I put the proxy.pac file
in the document root, and symlink wpad.dat to it. I have a primary
and backup proxy defined in the proxy.pac. Then I setup a secondary
web server in the domain above, so the clients have automatic
failover in case the primary proxy/webserver is unavailable. It seems
to be a pretty good system, and it only requires a single checkmark
in the config, which is helpful for having unsophisticated help
configure the clients correctly the first time around.

Feel the Joy,