Trying to set up a "masked URL redirect" (that might not be the correct term)

Trying to set up a "masked URL redirect" (that might not be the correct term)

Problem Description:

OK, what I want is, if a person types the URL "" they actually go to "" (but the URL bar shows "").

Here is what I have done so far:

  • We purchased a SSL from goDaddy that allows us to add multiple domains and both domains are on it.
  • is our main site, on a windows server at Rackspace that I have control over, and that works as expected
  • I have registered at NameCheap, the DNS is hosted at a 3rd party (plesk server that I have control of)
  • I have added a CNAME at the 3rd party DNS that points to
  • I have added the "zone" to the DNS at Rackspace and it points to the webserver’s IP
  • I have added a CNAME at the Rackspace DNS that points to

But it’s not working as I want, can you tell me what I am doing wrong?

Solution – 1

You aren’t mentionning the use of Name Virtual Hosting on and for this reason you’re ending serving that old domain matching the same IP.

Name Virtual Hosting allows one to publish multiple applications on the same IP, or to publish a very same application with different domain names (what you call "masking"). However for the latter to be completely transparent, nothing like a 301/302 Redirect from one domain to the another should be configure.

Have a look at how configuring Configuring SSL Host Headers in IIS.

Solution – 2

According to your description, when you type in the browser, you want to be redirected to, but the URL bar of the browser still displays

In IIS, to achieve this effect you need to use the URL Rewrite module and configure proxy settings for ARR. If you have not installed the ARR module on IIS, you can refer to this link.

When you have two websites, the domain name of website 1 is bound to, and the domain name of website 2 is bound to If you want to achieve your needs, you need to create a rewrite rule on website 2. The following URL rewrite rule in the web.config can give you a reference:

                <rule name="test rule in website2" enabled="true">
                    <match url=".*" />
                    <action type="Rewrite" url="" />

Also, you need to select Application Request Routing Cache module at server level and select "Server Proxy Settings…" on the right tree node
, then check "Enable Proxy" and apply.

At this time, when you type in the browser, you will see that the page loads the content of the website, and the URL bar still shows


Rate this post
We use cookies in order to give you the best possible experience on our website. By continuing to use this site, you agree to our use of cookies.