I have one server, and two sitets -- let's say A and B.
The problem (for me) is when I shut down B site, when I try to browse:
www.b.com
instead of displaying an error, IIS redirects me (silently) to A, so in effect I get the addres:
www.a.com
So how to block this redirection (and display an error)?
IIS 7.
Your site bindings for www.a.com are most likely general enough that they catche www.a.com too. i.e. it's a binding by IP address, which is the same for both sites.
Matt's suggestion will work, to create a custom handler on www.a.com. You can also leave your www.b.com site up, with the binding for www.b.com, and point all traffic to an error page.
Or, you can update your DNS record for www.b.com to point to another server or location entirely.
On your default site,
create a script that shows the error that you want. I had to do the same thing a while ago, because all .domain.tld sites were really just a virtual directory.