Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

We're going through a domain name change. We currently have set up https:// secure.olddomain.com for traffic. I just set up https:// secure.newdomain.com with a new cert for the domain. The new domain works fine, but I set up a website in IIS with a host header for secure.olddomain.com and told it to redirect to https:// secure.newdomain.com

However, whenever I go to https:// secure.olddomain.com it just gives me an error about the certificate, and doesn't redirect. The only cert I have installed is for the new domain on that IIS website, I don't have one set up on the redirect.

How do I get this to redirect properly?

(had to add spaces after the http:// because the site gave me a warning about posting too many "links")

share|improve this question

2 Answers 2

When a browser uses http://secure.olddomain.com, that is the name that needs to be validated in IIS before any of your redirect code or settings are applied. You have about 3 possible options:

  1. Purchase a cert for another year for secure.olddomain.com and setup a redirect site that listens on that name and redirects back to secure.newdomain.com (or just https://www.newdomain.com, which is often better yet). That will keep the browsers happy during the redirect.
  2. Fix all references in code/bookmarks to the old location so that people don't use it anymore. Of course that's easier said than done, which is why a year overlap of the two names can be helpful.
  3. Allow people to just accept the warning ... of course that doesn't really solve it, but I added it for completeness.
share|improve this answer
    
We've updated most of the code references that we know of so far. Our biggest concern right now is bookmarks and links from other sites. All our other subdomains are redirecting properly, it's just the SSL ones that are giving us problems. I reinstalled the old cert on the server and assigned it to the secure.olddomain.com website, and have verified that the right cert is used, but when I view it in the browser it still doesn't redirect after flushing dns and clearing cache. And it's also showing the cert for the newdomain site. –  Doug Mar 31 '11 at 15:05
    
What method did you use for the redirect? In IIS6 you can do it from the Home Directory tab: use "A redirection to a URL". In IIS7 at the site level use HTTP Redirect. Just be careful in IIS7 because if you share the same folder as another site, it will affect both sites. Double check that your settings are still there. You can use URL Rewrite in IIS7 too if you want. Also, since you mentioned that it shows the cert for the new domain, it sounds like the bindings may be on that site. Double check your bindings to ensure that they are specific enough to catch correctly. –  Scott Forsyth - MVP Mar 31 '11 at 19:34
    
I'm using IIS6 on this server, but I think what the problem may now be is having multiple certs in IIS. I tried doing the same thing on another subdomain on a different server with IIS7 and found you can only have one SSL site unless you do a lot of workarounds. I'm sure the same thing is happening here. Even though I have 2 different sites with host headers - because it's going over SSL it's hitting the new one when you try to go to the old one and throws the cert error. I guess I have some research to do for multiple certs in IIS6. –  Doug Apr 1 '11 at 13:25
    
Hi Doug. I created 2 videos on the SSL bindings issue. They may be helpful on your research. weblogs.asp.net/owscott/archive/2011/02/05/… and weblogs.asp.net/owscott/archive/2011/02/12/… Note that the 2nd video briefly mentions how to configure it in IIS6 at the end. –  Scott Forsyth - MVP Apr 1 '11 at 14:31

I don't think you want a host header, but rather a HTTP 301 Permanently Moved.
http://www.hpseo.co.uk/301-redirect-tutorial-iis/

share|improve this answer
    
I have both the "The exact URL entered above" and "A permanent redirection for this resource" checked. I have the first one checked so I can take advantage of the parameters https ://secure.newdomain.com$S$Q –  Doug Mar 31 '11 at 15:01

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.