Use this when installing or renewing TLS certificates on IIS.
TLS Certificates
IIS TLS certificates are imported into the computer's Personal store and selected on an HTTPS binding. Include the full chain, use SNI for several sites, and renew before expiry, for example with win-acme or ACME clients.
1. Get-ChildItem IIS:\SslBindings.
2. Certificate valid, SAN covers name, private key present.
3. SNI bindings per host.
4. Renewal process (re-bind).
5. Test with browser/Test-NetConnection -Port 443.
HTTPS binding → certificate → TLS handshake
Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Common mistakes Narrow the fault
- Forgetting to update bindings after renewal (use Centralized Certificate Store or automation).
Evidence · 1 on this Topic
Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.
- The certificate must be in the Local Machine Personal store.
- Send the full chain including intermediates.
- Renew before expiry and rebind.
Get-Website— sites, state, bindingsGet-IISAppPool— application pools and stateGet-WebBinding— bindingsGet-ChildItem IIS:\SslBindings— certificate bindingsGet-Content C:\inetpub\logs\LogFiles\W3SVC<id>\*.log -Tail 20— request log
ReferenceWhy it matters1 section · depth on demand
How it works
IIS does not hold certificates itself: HTTP.sys binds a certificate (by thumbprint from Cert:\LocalMachine\My) to an IP:port or, with SNI, to a hostname:port. The app pool identity needs no access to the private key; HTTP.sys uses it. Protocols and ciphers are set system-wide in SChannel (registry or tools such as IIS Crypto).
ReferenceImportant terms & boundaries2 sections · depth on demand
In depth
Where the binding really lives
IIS site bindings are stored in IIS configuration, but the certificate binding is held by HTTP.sys. With SNI the key is hostname:port; without SNI it is IP:port.
C:\> netsh http show sslcert
SSL Certificate bindings:
-------------------------
Hostname:port : www.example.com:443
Certificate Hash : 3a5f...c2
Application ID : {4dc3e181-e14b-4a21-b022-59fc669b0914}
Certificate Store Name : My
Negotiate Client Certificate : Disabled
Microsoft's SNI article shows these hostname:port entries in netsh http show sslcert. If the thumbprint there differs from the renewed certificate, clients still get the old one.
Renewal without downtime
$new = Get-ChildItem Cert:\LocalMachine\My | Where { $_.Subject -like '*www.example.com*' } | Sort NotAfter | Select -Last 1
$b = Get-WebBinding -Name 'Site1' -Protocol https -HostHeader 'www.example.com'
$b.AddSslCertificate($new.Thumbprint, 'My')
Or use the Centralized Certificate Store, where IIS picks the certificate by file name per host name and renewal means replacing a .pfx file.
Checklist when HTTPS fails
| Symptom | Check |
|---|---|
| Browser shows the wrong certificate | SNI flag missing on the binding (SslFlags 1), or the client does not send SNI |
ERR_CONNECTION_RESET immediately | No HTTP.sys binding for that hostname:port/IP:port |
| Certificate present but "no private key" | Imported without key, or key permissions broken — re-import the PFX |
| Chain errors | Intermediate certificate missing from Cert:\LocalMachine\CA |
| Old TLS versions offered | Schannel registry settings / Disable-TlsCipherSuite; test with an external scanner |
Verify from a client
Test-NetConnection www.example.com -Port 443
openssl s_client -connect www.example.com:443 -servername www.example.com
-servername sends SNI; compare the result with and without it to see whether a default (non-SNI) binding answers.
*The IIS TLS certificate binding fields above are illustrative examples, not captured from a lab or production system.*
Commands
Get-ChildItem Cert:\LocalMachine\My | Select Subject,Thumbprint,NotAfter
netsh http show sslcert
New-WebBinding -Name Site -Protocol https -Port 443 -HostHeader www.example.com -SslFlags 1
Documented example, not captured output.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in IIS → TLS Certificates. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://learn.microsoft.com/en-us/iis/ · confidence 94%Terms & aliases
Hover a linked term for a quick definition; click it to open its glossary entry. Aliases are other names that find this Topic in search.