IIS Powershell : Assign an existing SSL binding to a website

iisiis-7powershellwindows-server-2008windows-server-2008-r2

I already have an SSL binding created for one of my websites in IIS 7.5.

Now I'm adding another website which listens on the same IP and port (443) but uses a different host header.

When I try to assign the binding using this powershell command:

New-WebBinding -Name $siteName -IP "*" -Port 443 -Protocol https -HostHeader $hostHeader 

OR

New-ItemProperty $sitePath -name bindings -value @{protocol="https";bindingInformation=":443:"+$hostHeader}

I get the following error in Powershell.

SSL binding for end point 0.0.0.0:443 already exists.
    + CategoryInfo          : InvalidData: (:) [New-Item], ProviderException
    + FullyQualifiedErrorId : SSL binding for end point 0.0.0.0:443 already ex
   ists.,Microsoft.PowerShell.Commands.NewItemCommand

How can I get rid of this error?

Best Answer

You get rid of the error by making a more specific binding. You currently have an SSL binding, on another website, bound to all IP addresses.

IIS 7.5 does not support SNI, so this is your only option. Without SNI you cannot have host name headers for SSL; you need one IP address per certificate.