Monday 3 October 2011

Https website losing the selected certifictate setting.

I have configured a website and assigned it to a SSL certificate, site works fine, but after some time the site looses the certificate. in order to resolve use

Configuring your wildcard to cover additional host headers (subdomains) on your server.
Once you have this configured you then need to run the following command (found in C:\Windows\System32\Inetsrv\) for each site you want to secure (IE: Site1.yourdomain.com, Site2.yourdomain.com, etc):

appcmd set site /site.name:"<SiteName>" /+bindings.[protocol='https',bindingInformation='*:443:<HostHeader>']



Replace <SiteName> with your name of your site (IE: MyWebsite2), and replace <HostHeader> with your sub domain (IE: site1.mydomain.com)


Return to IIS and you will now see that your sites have a HTTPS binding with a host header and the SSL certificate that was specified for your Default Web Site is selected, and it is also bound using your wildcard SSL.
One last point to make here is that if you try to edit this binding IIS will delete the host header and change the SSL certificate back to ‘Not Selected’. If this happens you will need to delete the binding and re-run the command line to add it again.

No comments:

Post a Comment