TLS/HTTPS: Bindings, SNI & the Centralized Certificate Store

IIS In Depth

Chapter 7 · TLS/HTTPS: Bindings, SNI & the Centralized Certificate Store

Web Servers Fundamentals Chapter 7 covered TLS termination generically across all three servers — certificates, chain of trust, the handshake itself. What it didn't cover is that IIS's actual certificate model is genuinely different from Apache's and Nginx's: neither a loose .pem file nor a plaintext private key sitting in a config directory, but an entry in the Windows Certificate Store, referenced by a binding rather than a file path.

The Windows Certificate Store, Not a File Path

Apache's SSLCertificateFile/SSLCertificateKeyFile and Nginx's ssl_certificate/ssl_certificate_key both point directly at files on disk. IIS instead expects a certificate to already be installed into the Windows Certificate Store — typically the Local Computer's Personal store (certlm.msc, or the Cert:\LocalMachine\My PowerShell path) — after which it's identified purely by its thumbprint, a SHA-1 hash uniquely fingerprinting that specific certificate:

Get-ChildItem -Path Cert:\LocalMachine\My # Thumbprint Subject # ---------- ------- # A909502DD82AE41433E6F83886B00D4277A32A7B CN=www.example.com

An HTTPS binding then references that thumbprint rather than a file path — the private key never sits in a plaintext file anywhere IIS's own configuration touches, since the Windows Certificate Store manages the key material itself, with its own export/access permissions independent of web.config or applicationHost.config entirely.

HTTPS Bindings and SNI

netsh http add sslcert hostnameport=www.example.com:443 ` certhash=a909502dd82ae41433e6f83886b00d4277a32a7b ` certstorename=MY appid={4dc3e181-e14b-4a21-b022-59fc669b0914} ` sslctlstorename=CA

Server Name Indication (SNI) is what makes it possible to bind several different certificates to the same IP address and port 443, each for a different hostname — the client's browser sends the requested hostname in cleartext as part of the TLS handshake itself, before encryption is established, letting IIS pick the matching certificate before the rest of the handshake proceeds. This exact mechanism is what allows dozens of HTTPS sites to share one IP address, the same underlying idea Web Servers Fundamentals Chapter 7 covered generically for name-based HTTPS virtual hosting. Before SNI support (IIS 8 and earlier lacked it entirely), each distinct certificate genuinely needed its own dedicated IP address, since the server had no way to know which hostname was being requested until after the handshake had already committed to one certificate.

The binding dialog's "Require Server Name Indication" checkbox is a real, consequential choice, not a formality: enabling it means very old clients that predate SNI support (legacy libraries, some old embedded devices) simply cannot connect at all, since they never send a hostname during the handshake for IIS to match against. Leaving it unchecked keeps a single "default" certificate for connections that don't specify SNI, at the cost of not being able to host multiple independent certificates cleanly on that same IP/port combination.

The Centralized Certificate Store (CCS): A Different Feature Entirely

It's easy to conflate this with the Windows Certificate Store just covered, because the name is so similar — but IIS's Centralized Certificate Store (CCS) is a genuinely separate, optional feature, aimed specifically at large-scale multi-tenant hosting with many sites and certificates. Instead of installing every certificate individually into the Windows Certificate Store and configuring a binding referencing its thumbprint, CCS stores certificates as .pfx files in one shared folder (often a UNC network path, shared across a web farm), named by convention after the hostname they belong to:

\\fileserver\certstore\ www.example.com.pfx api.example.com.pfx shop.example.com.pfx

IIS looks up the correct .pfx file dynamically at handshake time, based on the SNI hostname, rather than requiring a pre-configured binding entry per certificate — genuinely useful in a hosting environment adding and removing tenant certificates constantly, where manually managing individual store entries and bindings for each one doesn't scale.

Windows Certificate StoreCentralized Certificate Store (CCS)
Where certs liveInstalled into the OS-level store (Personal, Local Computer).pfx files in a shared folder, often a UNC network path
Referenced byThumbprint, in an explicit per-site bindingFilename convention matched against the SNI hostname, at handshake time
Best fitA handful of sites on one serverMany tenants/certificates, often across a shared web farm
Where this connects to Chapter 5
An HTTPS binding is configured at the site level, in applicationHost.config — not per application, and not in any individual application's own web.config. Every application under a site, regardless of its own Application Pool assignment from Chapter 5, is reached through whichever certificate that site's own binding presents.
Renewing a certificate doesn't update the binding automatically
Renewing a certificate — even one for the exact same hostname — produces a brand-new certificate object with a new thumbprint, once installed into the store. The existing HTTPS binding still references the old thumbprint and keeps presenting the old (soon-to-expire, or already-expired) certificate until someone explicitly updates the binding to point at the new thumbprint. This genuinely catches people who assume "renewing" is a drop-in replacement — it installs a new certificate alongside the old one, but does nothing to the binding pointing at the old one.

Hands-On Exercises

Exercise 1

Explain, in your own words, why IIS references a certificate by thumbprint in a binding rather than by a file path the way Apache and Nginx do, and what that means for where the private key material actually lives.

📄 View solution
Exercise 2

A team renews a certificate for www.example.com two weeks before it expires, installs the new certificate into the Windows Certificate Store, and considers the task done. On the expiration date, visitors suddenly start seeing certificate warnings. Explain what almost certainly went wrong and what step was missed.

📄 View solution
Exercise 3

Explain, in your own words, why the Centralized Certificate Store (CCS) is a genuinely different feature from the Windows Certificate Store despite the similar name, and describe the kind of hosting environment where CCS's own approach scales better than managing individual bindings per certificate.

📄 View solution

Chapter 7 Quick Reference

  • IIS certificates live in the Windows Certificate Store, referenced by thumbprint — not a file path, unlike Apache/Nginx
  • SNI lets multiple certificates share one IP:port, matched by the hostname sent (in cleartext) during the TLS handshake, before encryption is established
  • Pre-SNI, each certificate needed its own dedicated IP address — no way to know the requested hostname before committing to a certificate
  • "Require SNI" is a real tradeoff: enabling it excludes pre-SNI legacy clients entirely
  • Centralized Certificate Store (CCS) — a separate, optional feature for large-scale multi-tenant hosting: .pfx files in a shared folder, matched dynamically by hostname, not individual store entries/bindings
  • HTTPS bindings are configured at the site level in applicationHost.config, applying to every application under that site regardless of Application Pool (Chapter 5)
  • Renewal gotcha: a renewed certificate gets a new thumbprint — the existing binding must be manually updated to reference it, or the old certificate keeps being presented