Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a website with multiple bindings eg

Using IIS, can I force requests to the second two domains to redirect to

share|improve this question
Would this be better done with DNS? – ST8Z6FR57ABE6A8RE9UF Apr 13 '11 at 4:21
up vote 2 down vote accepted

You need to have two sites in IIS. The first listens on port 80 and is only bound to:

The second also listens on port 80 but is bound to all of the urls you want redirected, i.e.:

Use the IIS redirect options within IIS to redirect all requests to the first site.

Alternatively, you can also install the Url Rewriter module from Microsoft and create an inbound rewrite rule that does this as well.

share|improve this answer
Sounds good but I am going to do this via code, as a developer, its easier for me! – Petras Apr 14 '11 at 1:21

The details of how you do this through code can be found here

share|improve this answer

In IIS7, select the site you want the 'redirects' to occur for, select 'bindings' on the right hand side, and then just add an entry for each site you want the redirects to start from.

For example:

select "", select bindings, and then add separate entries with hostnames of "" and "".

EDIT 1 A hacky way to do that then would be to add them as individual sites, remove any index files from their site directories, and edit the 404 error page to perform a redirect. I've actually used this crappy method to do an SSL redirect.

share|improve this answer
Adding a binding does not cause a redirect. See my comment below. – Petras Apr 13 '11 at 5:25

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.