Ssl – Redirect https://olddomain.com to https://newdomain.com in IIS6

httpsiis-6redirectsslwebsite

What is the easiest way for me to redirect both http and https from olddomain.com to newdomain.com regardless of invalid certificate warnings?

  • newdomain.com is our current domain on IIS6
    and has SSL (with certificate) for some content
  • olddomain.com has a permanent redirect – but this won't
    work for https://olddomain.com. It is a second website in IIS6.

I've had problems researching this because most people are concerned about wildcard SSL certificates or the complexities of multiple SSL host headers for subdomains in IIS6. Warnings seem unavoidable with SSL applied before any redirects can action. Setting up a SSL IIS6 host header just to redirect doesn't seem right (or easy) but perhaps I could change the DNS and/or use an Apache hosting account we have.

Thanks in advance

Best Answer

First and foremost: Don't train your users to ignore certificate warnings. That is a bad thing. Look into a Subject Alternate Name certificate or just using a different listener address for the old domain.

That said.. you can set up a host header on port 443 in the same way that you'd be doing it if you did have a wildcard or alternate name cert.

Then run this to set up the binding, swapping in the identifier number of a site configured for redirects:

cscript.exe adsutil.vbs set /w3svc/<site number>/SecureBindings ":443:olddomain.com"