Not exactly: it depends on how the client is configured. Let's use IE as the basic example.
If you configure IE with an explicit proxy:
User types an address
IE checks the address for a string match against the IE proxy exceptions list (i.e. "Bypass proxy for these addresses:")
a. If it matches an entry in the bypass list, the client uses its DNS to resolve the name, and then the client connects directly to the target IP address on port 80 (assumed), then sends a request like:
GET /something.htm HTTP/1.1
and that's the end of it for a matching entry.
c. If no bypass list entries match, continue:
IE connects to its configured proxy, and sends a request of the form:
GET http://fulldomainname.example.com/something.htm HTTP/1.1
(BTW: this use of the FQDN as the URL is one way you can tell that a client thinks it's talking to a proxy instead of a real web server)
The proxy then resolves the host name using its own DNS, connects to the target site, etc, etc
When using WPAD/PAC:
In the case of using a WPAD or Autoconfiguration script (such as provided by ISA/TMG when autoconfiguration is enabled), it's different:
User types an address
Client downloads the current wpad.dat/autoproxy.js/.pac file from its configured location
Client looks for the entry point "FindProxyForUrl" in the js file, and executes it
a. this may include name resolution (IsInNet, DnsResolve)
b. this may include string matching (ShExpMatch)
c. this may include counting to a million (i++)
d. this may include narky alert popup messages if the admin's a jerk (or just funny (or debugging))
The FindProxyForUrl function returns at least one string: an ordered list of the best proxies to use (semicolon separated)
a. either "DIRECT", in which case the client then needs to resolve the name itself, as per the bypass case above
b. or "PROXY proxyname:8080" or similar, in which case the client connects to that port on the proxy, tells it to GET the full URL, and the proxy performs name resolution.
- As an example: if the script function returned "PROXY yourProxy:8080;DIRECT" that tells the client to connect to yourproxy on TCP port 8080 to request this URL, and if that connection can't be established, just try going direct.
Note that TCP session setup failure isn't exactly quick, so this isn't likely to be a pleasant failover experience for a user, but beats nothing. Maybe.
There are occasionally glitches, subtleties and unexplained behaviours, but for the most part when things aren't broken in weird and interesting ways, the above is how I've seen it work.
If you're interested in the Winsock Proxy Client (from TMG/ISA Server), that's a different story, with more flexibility and moving parts.
One final note: Once an HTTP client has decided to talk to a proxy for a given site/url, there's no way for the proxy to tell it not to. There is no HTTP status code or header for "I don't serve that, you should just go directly to it instead"... Once the client decides a particular URL is proxy-served, proxy-death-grip ensues. Only way to avoid it is by getting the selection logic right before the client makes its connection.