<p>I currently have 2 domain names that I want to setup different websites for. I am currently looking at using some free hosting that works well for my current needs but doesn't give me any way to point "mydomain.com" to the actual site. Instead I have to give users a longer, harder to remember url.</p>

<p>My proposed solution is to point my domains to my home ip and host a small ASP.NET app through IIS consisting of a redirect page that simply redirects to the appropriate site. Is there a way in ASP.NET to recognize which domain url was requested in order to know where to redirect the page to?</p>

From asp.net code you can access the host from the request object:
```
```
if(Request.Url.Authority == "www.site1.com")
    Response.Redirect(...);
```
```
If you have access to the IIS server you can also set up two sites with different binding host names and have each redirect as you like.