Search code examples
bindingowinhostnameself-hosting

Set Hostname binding and https with owin selfhosted website, WITHOUT iis


How do you bind the hostname?
In short: I need this for a selfhosted website without iis:

iis binding

I have found how to bind the certificate, but not how to bind the hostname.

netsh.exe http add sslcert ipport=0.0.0.0:82 certstorename=Root certhash=... appid={12345678-db90-4b66-8b01-88f7af2e36bf}


Solution

  • use netsh http add sslcert hostnameport="yoursite.com:443" ... as described here https://weblog.west-wind.com/posts/2016/Jun/23/Use-Powershell-to-bind-SSL-Certificates-to-an-IIS-Host-Header-Site