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.

How I can have two different domains pointing to same IIS server and make the server detect which one of the domain is being forwarded to it and use that to serve the domain the proper page?

Also, how can I hide this from the domain visitor and make the user feel hat he/she is still on the domain and the calls are not being forwarded? In other words the url in the browser address bar would still be relative to the actual domain.

Is there any technical name for doing such thing? forwarding, redirecting, mapping?

share|improve this question

migrated from stackoverflow.com Jul 2 '11 at 18:09

This question came from our site for professional and enthusiast programmers.

2 Answers 2

From your question it is not clear what exactly you want to achieve.

If you want to have seperate websites on the same IIS server, in that case the solution is to have each website configure its own Host Name in the Site Bindings dialog.

If you want the same website to be able to serve two domains and redirect internally accordingly, you can use Server.Transfer which is a server side redirect, the ASP.NET processor redirects and executed the new url but the client is unaware of that.

share|improve this answer

With regrds to your first question you will need to add host header values in iis properties.

share|improve this answer

Your Answer

 
discard

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.