Redirect Multiple Domains with Same IP Address


Our company has for many years had multiple domain names to protect our product name. When our webiste was first set up we had all these domain names resolving to on IP address which worked fine until now. We rewrote the site with ASP.NET MVC and now use Recaptcha. The Recaptcha keys are registered to "" which is our main domain. We have other domains like "" and "" that points to the same IP address. when someone comes to our site from the alternate domains, Recaptcha doesn't work because the keys aren't registered for that alternate domain. We would like to redirect eveything that comes in from "" to "".

I have read that you can set up the sites in IIS and use a permanent redirect, but will this work if the domains all point to the same IP address?

We also have installed the Rewrite Module for IIS 7 because a lot of our pages moved when we switched to MVC. Is it possible to write a rule and if so how?

Is there a better alternative we should be using?

Any help to shine some light on this is greatly appreciated.

I have no problem setting up the domains in IIS, will this work if the domains all point to the same IP address? If I go to ( will it ever end up at ( which redirects to and cause an infinate loop because they are on the same IP address?

How would CNAME be done in a Windows 2003 DNS Server?

Best Solution

For the CNAME approach you need to pick ONE domain name and make that your primary. So make the go-to, and every OTHER domain name redirects to this one. Then you can avoid the infinite loop.

There is also a way to setup a configuration on the server so that browsers will allow multiple domains to look at a single cookie, in this case,, then when and try to read's recaptha session info, it will work. This would allow you to still have multiple url's in the browser, and support shared sessions.

Personally I would just redirect them all to a single domain, MUCH easier to implement.

so do:        A  CNAME     CNAME CNAME


EDIT: Yes, I was asleep when I wrote this. This is only part of the solution, I posted the remainder of it below.

Related Question