Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

I have a site I use for development testing on one of our development servers, it is hosted at dev.domain.com.

I basically want to have www.domain.com, www.domain.ca, fr.domain.ca all point to dev.domain.com, yet I want the site url to remain www.domain.com, www.domain.ca, fr.domain.ca (whichever was originally requested). How do I set this up in IIS 7?

Right now, all I am worried about is testing on the development machine. I also have access to the development machine if I need to run the browser directly on the dev machine.

Is this a simple hosts file change and host headers change in IIS 7? Either way, how would I go about doing this in detail?

share|improve this question
    
And I'm assuming you have setup A records for FR WWW at the name server or registrar DNS management as well as updated IIS7 configuration to recognize this? –  bybe Apr 16 '13 at 21:47

2 Answers 2

up vote 2 down vote accepted

It's as simple as adding each domain as a host header to your dev.domain.com site bindings. IIS won't change the HTTP_HOST as passed by the client except in certain circumstances, such as a site bound to the loopback address.

share|improve this answer
    
Thank you for the reply...I am trying this out on my local machine first, don't know if that makes a difference. I've only been able to get sub-domains to work properly. This is not what I want, but I got fr.domain.com and ca.domain.com to work, but nothing with a different domain (e.g. can't get fr.domain.ca or www.domain.ca to work). I did alter my host file to make localhost point to these domains on my local machine. What am I doing wrong? –  gangelo Apr 16 '13 at 16:49
    
Didn't work on my local machine, but worked on the dev web server by simply adding host headers. –  gangelo Apr 17 '13 at 15:50

If you have access to your Plesk panel, first of all add all those domains as aliases to point to your main domain. You can create the redirects to your main domain using IIS Redirects section( see more details via the link http://www.trainsignal.com/blog/iis7-redirect-windows-server-2008)

share|improve this answer
    
Redirects change the domain name. –  gangelo Apr 17 '13 at 15:51

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.