Use this when the wrong site answers or HTTPS uses the wrong certificate.
Bindings
IIS bindings define how requests reach a site: protocol (http or https), IP address, port and host name. HTTPS bindings also select a certificate and can use SNI so many sites share one IP.
1. Get-WebBinding — protocol, IP, port, host header.
2. Duplicate bindings conflict.
3. HTTPS binding with SNI and certificate.
4. Port in use by another process? netsh http show urlacl / Get-NetTCPConnection.
5. Test each name.
request host/port → matched binding → site
Context & applicabilityCommon mistakes · platform/version boundaries
- Two sites with the same IP/port and no host name, so only one starts.
- HTTPS bindings without SNI on servers hosting several certificates.
- Certificate renewed but binding still pointing to the old thumbprint.
- Binding to a specific IP that changes.
Operational reference
Fast context before you go deeper.
Get-WebBinding -Name IntranetVerification & 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 Verification path Verify boundary
# Site bindings as IIS sees them
Get-IISSite | ForEach-Object { $s=$_.Name; $_.Bindings | Select-Object @{n='Site';e={$s}}, Protocol, BindingInformation, SslFlags }
# Certificate bindings as HTTP.sys sees them
netsh http show sslcert
# From a client: which certificate is served for the name?
# (Linux/macOS or Windows with OpenSSL)
openssl s_client -connect app.example.com:443 -servername app.example.com </dev/null | openssl x509 -noout -subject -enddate
The IIS binding, the hostnameport= entry and the certificate actually served must agree on host name and thumbprint.
Step 2 Troubleshooting Narrow the fault
- Wrong site answers: compare the request's Host header with bindings; check DNS points to this server.
- Certificate expired after renewal: the new certificate has a new thumbprint — update the binding (or use the Centralized Certificate Store / automated renewal that rebinds).
- HTTPS fails, HTTP works: no certificate binding, private key not readable, or TLS protocol/cipher settings refuse the client.
- Port conflict:
netstat -ano | findstr :443to find the owning process.
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.
- IP, port and host header together select the site.
- SNI lets several HTTPS sites share one IP with different certificates.
- Two sites with the same binding cannot both start.
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
ReferenceWhat it is1 section · depth on demand
Direct Answer
A binding (protocol/IP:port:hostname) decides which site gets a request. For several HTTPS sites on one IP, use host names with SNI (SslFlags 1); the certificate is bound in HTTP.sys (netsh http show sslcert) by thumbprint, so a renewed certificate must be rebound. A request with an unknown host name lands on whichever wildcard binding matches.
ReferenceWhy it matters1 section · depth on demand
Binding examples
New-WebBinding -Name app -Protocol https -Port 443 -HostHeader app.example.com -SslFlags 1
$cert = Get-ChildItem Cert:\LocalMachine\My | Where Subject -like "*app.example.com*"
(Get-WebBinding -Name app -Protocol https).AddSslCertificate($cert.Thumbprint, "My")
netsh http show sslcert
Documented example, not captured output. SslFlags 1 enables SNI so several HTTPS sites can share one IP. Two sites with the same IP/port/host header cannot both start.
ReferenceImportant terms & boundaries1 section · depth on demand
In depth
A binding tells HTTP.sys which requests belong to a site: protocol, IP address, port and host name — https/*:443:app.example.com. For HTTPS, the binding also needs a server certificate, which HTTP.sys stores separately from IIS configuration.
How a request is matched
HTTP.sys picks the most specific match: a binding with an explicit IP and host name beats wildcard ones. Several sites can share *:80 or *:443 only if they use different host names; two sites with the same IP, port and empty host name cannot both start.
HTTPS and SNI
| SslFlags | Meaning |
|---|---|
| 0 | IP:port certificate binding (one certificate per IP:port, no SNI) |
| 1 | SNI — certificate chosen by host name; needed for several HTTPS sites on one IP |
| 2 | Centralized Certificate Store (certificates loaded from a file share by name) |
| 3 | SNI + Centralized Certificate Store (flags 1 and 2 combined) |
| 4, 8, 16, 32, 64 | Flags to disable HTTP/2, OCSP stapling, QUIC, TLS 1.3 over TCP or legacy TLS for this binding (IIS 10 version 1809 and later) |
Certificate bindings are visible with netsh http show sslcert as ipport= (non-SNI) or hostnameport= (SNI) entries pointing to a certificate thumbprint in the machine store.
New-IISSiteBinding -Name app -BindingInformation '*:443:app.example.com' -Protocol https `
-CertificateThumbPrint '<thumbprint>' -CertStoreLocation 'Cert:\LocalMachine\My' -SslFlag Sni
Clients that send no SNI (very old clients, some health checks) get the IP:port default certificate or none — keep a sensible default binding or certificate.
ReferenceConfiguration & state1 section · depth on demand
Commands
New-WebBinding -Name Intranet -Protocol https -Port 443 -HostHeader intranet.corp.local -SslFlags 1
Get-WebBinding -Name Intranet
netsh http show sslcert
Documented example, not captured output. -SslFlags 1 enables SNI; then assign the certificate to the binding.
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 → Bindings. 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.
Deep reference
Healthy vs suspicious evidence
Output interpretation
| Observation | Meaning |
|---|---|
| Site will not start: "another web site may be using the same port" | Duplicate IP:port:host binding, or another program (e.g. Skype for Business, a dev server) owns the port |
| Browser shows the wrong certificate | SNI flag missing (IP:port binding wins), or the client did not send SNI |
Binding exists but no hostnameport entry | Certificate binding lost (e.g. certificate deleted after renewal) |
HTTPERR Connection_Dropped / TLS errors | Certificate missing private key or not accessible to HTTP.sys |
| Request lands on Default Web Site | Host name not in any binding; the wildcard binding caught it |