Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have several bindings for a particular website.

domain1.com   -  IP address1
domain2.com   -  IP address1
localhost     -  *

I would like the public to be able to access domain1.com

however, I would only like a specific IP address to be able to access domain2.com

I would like both bindings to access the same site.

Is this doable in IIS 7?

share|improve this question

1 Answer 1

up vote 1 down vote accepted

Quite doable, you can even do sub-folder level IP restrictions in IIS-7. You have to install the feature that allows this ("IP and Domain Restrictions"). It will show up in the IIS-7 view under the IIS section and will be called "IP and Domain Restrictions".

Edit: IIS7 doesn't allow what you want. Bound addresses and hostnames are properties of sites, and a site has a monolithic settings base. In order to do what you need, you need to create a new site and apply different restrictions. You can do this a couple of ways.

  • (supported) Completely duplicate the site directory structure in the other location.
  • (probably not supported) Use 'mklink' to create a symlink to the first site's directories. You may have issues with competing web.config files, though.
share|improve this answer
I have that feature installed... how do I restrict just one of my bindings? Thanks for the help –  George W Bush Oct 5 '10 at 21:42
@hamlin11 If I'm reading you correctly, you have a single site that's answering up to multiple identities. To do this you'll need to create a different site (it can be rooted in the same directory) that answers to the other domain. –  sysadmin1138 Oct 5 '10 at 21:46
@sysadmin1138, I did not know that you can have multiple sites rooted in the same directory. Thanks for the help –  George W Bush Oct 5 '10 at 21:58
@sysadmin1138, can you provide some insight here? Thanks serverfault.com/questions/187931/… –  George W Bush Oct 5 '10 at 23:39
@hamlin11 Maniac has 90% of it. 'mklink' may help you here, but you'll still suffer the conflicting web.config file problem. –  sysadmin1138 Oct 5 '10 at 23:46

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.