Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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 on IIS 7 and I created a subdomain and I want this subdomain to point to a page in this website.

Example: --> this is the main website and its default page is default.aspx --> I want if someone opening this url will forward to this page:

How to setup this in my IIS 7?

share|improve this question

There are a couple of options including setting up a new site in IIS and pointing it to the directory/page you want, however the most widely accepted method would be to use URL rewrite rules to configure the subdomain. The steps to do so are a little in depth to lay out in all their glory here, but I am providing a link to the iis web team document detailing how to configure an IIS rewrite rule in IIS7, this should get you started down the correct path to configure what you need.

share|improve this answer
I want to use the first option, but how to point to a page not a directory? – Amr Elgarhy Nov 29 '10 at 15:26
So, if I were going to do this using the "separate IIS site" option, I would create a second site in IIS and give it a root directory. Then create a redirect that points all requests to this site to HTTP Redirection is not installed by default in IIS 7 so you will need to install it as a feature but once you do it is dreadfully easy. *Extra Credit - this is also a super easy way to redirect alternate domain names (ie without the www) to the same site in specific scenarios where DNS alone won't fit the bill. – Charles Dec 2 '10 at 16:36
@Charles is correct, and I will note that a side effect of the "redirect" solution is that once redirected the user will see in their browser URL. If that's not what you are expecting then the 2nd option (rewrite) is the option to look at. – Bret Fisher Feb 16 '12 at 1:12

Sorry for my english. Not native. My solution isn't perfect, but it works quite well in our enviroment and I hope it work for you too.

First of all, I suppose both DNS points to the same IP.

Then you create a new website, in the same port (usually 80) and edit it to receive "only" users (Binding option).

That site will be only show to users using members... (and invisible to the rest)

Inside it, a simple html page like this:

<head> <script type="text/javascript">
<!-- window.location = "" //-->
</script> </head> <body></body> </html>

Save it like "index.html" and configure the site to use it as default web page.

Each time a user goes to members... will be instant-trasnfered to the page of ur choice.

The beaty of this system is that you can use the same method to move from HTTP to HTTPS and be transparent to the user.

Hope this helps.

share|improve this answer

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.