SSL certificate not showing in IIS bindings: how to import, bind and fix it
On Windows Server you install a certificate, open the site's bindings in IIS Manager, choose https, and the certificate you just added is not in the list. Or it is there, you bind it, and browsers still get a warning or the wrong certificate. Both problems come down to a few specific causes: the certificate has no private key on this server, it sits in the wrong certificate store, the request was completed on a different machine, or the binding is set up without the right host name and Server Name Indication. This guide shows you how to check each of these with IIS Manager, PowerShell and certutil, how to import a PFX file correctly, and how to set up bindings so every hostname gets the right certificate.
- Why IIS hides a certificate from the bindings list
- The common causes
- How to check the certificate and its key
- Importing a certificate the right way
- Setting up HTTPS bindings with SNI
- Worked example: the certificate that vanished
- The fix, step by step
- Edge cases worth knowing
- Keeping IIS certificates working
- Questions and answers
Why IIS hides a certificate from the bindings list
The SSL certificate drop-down in the Add Site Binding dialogue does not list every certificate on the machine. It lists certificates in the local computer's Personal store (also shown as My) or the Web Hosting store that have a matching private key on this server. A certificate without its private key is useless to a web server, because the server cannot prove it owns the certificate, so IIS leaves it out.
That gives three questions to answer when a certificate is missing:
- Is the certificate in the Local Computer store, rather than your own user account's store?
- Is it in Personal or Web Hosting, rather than Trusted Root, Intermediate or Other People?
- Does it have a private key? In the Certificates snap-in, a certificate with a key shows a small key on its icon and the text You have a private key that corresponds to this certificate on its General tab.
If the answer to any of these is no, the certificate will not show in IIS. If the certificate does show and still does not work, the problem is in the binding: the wrong host name, SNI not ticked, or another site on the same IP and port taking priority. For the general picture of certificate errors outside IIS, see fixing SSL errors.
The common causes
| Cause | Typical sign | Fix |
|---|---|---|
| Request completed on a different server from the one that made the CSR | Certificate appears after Complete Certificate Request, then vanishes when you refresh | Complete it on the original server, or rebuild the key link with certutil |
| Imported a .cer or .crt file only | Certificate visible in the snap-in with no key icon | Import a .pfx that contains the key |
| Imported into the Current User store | Visible in certmgr.msc but not in IIS | Import into Local Computer, Personal |
| Imported into the wrong folder | Sits under Intermediate or Trusted Root | Move it to Personal |
| PFX made with newer encryption than Windows supports | Import fails with a password or format error on older Windows Server | Re-export the PFX with legacy encryption |
| Binding without host name or SNI | Every site on the server gets the same certificate | Add host name and tick Require Server Name Indication |
| Intermediate certificate missing | Works on some devices, fails on others | Install the intermediate into Intermediate Certification Authorities |
How to check the certificate and its key
Open PowerShell as administrator and list the certificates in the local Personal store with their key status:
Get-ChildItem Cert:\LocalMachine\My |
Select-Object Subject, Thumbprint, HasPrivateKey, NotAfter, @{n='DNS';e={$_.DnsNameList -join ', '}} |
Format-List
Find your certificate by its subject or DNS names. If HasPrivateKey is False, IIS will not offer it. Also check NotAfter for the expiry date and the DNS list for every hostname you need.
To see what HTTP.sys, the part of Windows that actually handles TLS for IIS, has bound to each address:
netsh http show sslcert
Entries labelled IP:port are bindings without SNI, which apply to every hostname on that address. Entries labelled Hostname:port are SNI bindings for one hostname. The certificate hash shown should match the thumbprint of the certificate you expect.
Repairing the link to a private key
If the key does exist on this machine, for example because the CSR was made here but the response was imported as a plain file, certutil can join them again. Use the certificate's serial number or thumbprint:
certutil -repairstore my "1a2b3c4d5e6f7081"
A message that the encryption test passed means the key was found and linked. Refresh Server Certificates in IIS and the certificate now appears. If certutil cannot find a key, it was never on this server, and you need either a PFX from the machine that made the CSR or a new request.
Importing a certificate the right way
The safest format for IIS is a PFX (also called PKCS#12) file, which carries the certificate, its private key and usually the intermediate certificates in one password-protected file. In IIS Manager, select the server, open Server Certificates and choose Import. Pick the PFX, enter its password and choose the Personal or Web Hosting store.
The same import in PowerShell:
$pw = Read-Host -AsSecureString -Prompt "PFX password"
Import-PfxCertificate -FilePath C:\certs\example.pfx `
-CertStoreLocation Cert:\LocalMachine\My -Password $pw
Building a PFX from PEM files
If your authority or another server gave you separate PEM files, combine them with OpenSSL. OpenSSL 3 encrypts the PFX with modern AES settings by default, which older Windows Server versions such as 2016 cannot read, so add -legacy when the target is an older server:
openssl pkcs12 -export -out example.pfx \
-inkey privkey.pem -in cert.pem -certfile chain.pem -legacy
Keep the PFX file and its password safe, and delete copies from download folders once imported. Anyone with both can run a site as your domain.
Setting up HTTPS bindings with SNI
In IIS Manager, select the site, choose Bindings, then Add. Set Type to https, IP address to All Unassigned, port 443, and enter the host name, for example www.example.com. Tick Require Server Name Indication, choose the certificate and save. Add a separate binding for each hostname the site answers to, such as the bare domain and www.
The same binding in PowerShell, using the WebAdministration module:
Import-Module WebAdministration
New-WebBinding -Name "Example Bakery" -Protocol https -Port 443 `
-HostHeader "www.example.com" -SslFlags 1
$cert = Get-ChildItem Cert:\LocalMachine\My |
Where-Object { $_.DnsNameList -contains "www.example.com" } | Select-Object -First 1
(Get-WebBinding -Name "Example Bakery" -Protocol https -HostHeader "www.example.com").AddSslCertificate($cert.Thumbprint, "my")
-SslFlags 1 turns on SNI. Without it, the binding is an IP and port binding, and only one certificate can be used for all sites on that address and port. IIS warns you if another site already uses the same non-SNI binding, and saving replaces the certificate for both sites, which is a common way to break a second site by accident.
| Binding setting | Use it when |
|---|---|
| Host name plus SNI | Several HTTPS sites share one IP address, which is the usual case |
| No host name, no SNI | One fallback site per IP address, for clients that send no host name |
| Centralized Certificate Store | A web farm loading PFX files from a shared folder by host name |
Worked example: the certificate that vanished
An agency created a CSR for www.example.com on a staging server, ordered the certificate, then ran Complete Certificate Request on the live server. The certificate appeared in Server Certificates, then disappeared after a refresh, and never showed in the bindings list.
Get-ChildItem Cert:\LocalMachine\Myon the live server showed the certificate withHasPrivateKeyset toFalse.certutil -repairstore mywith its serial number reported that no key was found, confirming the key lived on staging.- On the staging server, the agency completed the request there, then exported the certificate as a PFX with its private key and the full chain.
- They imported the PFX on the live server into Local Machine, Personal.
HasPrivateKeynow showedTrue. - They added https bindings for example.com and www.example.com with SNI ticked, then confirmed with
netsh http show sslcertthat two Hostname:port entries carried the right hash. - A request with
curl -vI https://www.example.comshowed the new certificate and no TLS error.
The fix, step by step
Step 1
List the certificate and its key
Open PowerShell as administrator and run Get-ChildItem Cert:\LocalMachine\My with Subject, Thumbprint and HasPrivateKey selected. Find the certificate by its subject or DNS names. If it is not listed, it is in the wrong store. If HasPrivateKey is False, IIS will never show it in the bindings list. Note the thumbprint and expiry date, because you will need the thumbprint to check the binding later. Repeat the listing after each change in the steps below.
Step 2
Move it to the right store
If the certificate is in your user store or under Intermediate or Trusted Root, open mmc, add the Certificates snap-in for the Computer account, and drag or re-import it into Personal. Certificates imported by double-clicking a file often land in the Current User store. Refresh Server Certificates in IIS Manager afterwards and check whether the certificate now appears there with the correct name and expiry date.
Step 3
Restore the missing private key
If the certificate has no key, run certutil -repairstore my followed by its serial number. If the CSR was made on this server, certutil finds the key and links it, and the certificate appears in IIS. If certutil reports no key, the key is on the server that made the CSR. Complete the request there and export a PFX, or create a new CSR on this server and ask the authority to reissue.
Step 4
Import a PFX with the key
Get a PFX that holds the certificate, its private key and the chain. Import it through IIS Manager, Server Certificates, Import, choosing the Personal or Web Hosting store, or use Import-PfxCertificate with -CertStoreLocation Cert:\LocalMachine\My. If an older Windows Server rejects the password or format, rebuild the PFX with OpenSSL using -legacy. Confirm HasPrivateKey now shows True for the certificate, and that it appears in the Server Certificates list in IIS Manager.
Step 5
Install the intermediate certificate
Open the certificate in the snap-in and look at the Certification Path tab. If it ends with an error or a missing issuer, import the intermediate certificate from your authority into Intermediate Certification Authorities on the Local Computer. A PFX built with the chain does this automatically. Check the path again and make sure it shows every level up to a trusted root without warnings.
Step 6
Add an https binding per hostname
In IIS Manager open the site's Bindings and add an https binding on port 443 with the host name filled in, for example www.example.com, and Require Server Name Indication ticked. Select the certificate and save. Repeat for the bare domain and any other names the site uses. If IIS warns that another site uses the same binding, stop and add host names and SNI rather than replacing the shared certificate.
Step 7
Check what HTTP.sys has bound
Run netsh http show sslcert and find the entries for your hostnames on port 443. SNI bindings show as Hostname:port, and each certificate hash should match the thumbprint you noted earlier. If an old hash appears, edit the binding and choose the new certificate. Remove stale IP and port bindings that no site needs, as they can hand an old certificate to clients that send no host name.
Step 8
Test from outside the server
From another machine, run curl -vI https://www.example.com and openssl s_client -connect www.example.com:443 -servername www.example.com. Check the certificate subject, the SAN list, the expiry date and Verify return code: 0 (ok). Test every hostname with a binding. Testing on the server itself can be misleading because of local hosts entries and certificates already trusted on that machine. A phone on mobile data is a useful final check.
Step 9
Redirect to https and set renewal
Add an HTTP to HTTPS redirect with the URL Rewrite module in web.config, then test it with curl -I http://example.com, looking for a 301 to the https address. If you use an ACME client such as win-acme, check its scheduled renewal task exists and that it updates the bindings. Otherwise, set a calendar reminder a month before the expiry date shown in the certificate listing.
Edge cases worth knowing
- Let's Encrypt on IIS. ACME clients for Windows, such as win-acme, request the certificate, import it with its key and update the bindings for you, and set up a renewal task. Check the task runs, because a renewed certificate must be rebound each time.
- Wrong hostname on the certificate. If the certificate shows but browsers report a name mismatch, the certificate does not list that hostname; see hostname mismatch fixes.
- Missing intermediate. Windows can sometimes fetch a missing intermediate itself, but phones and crawlers may not. Install it under Intermediate Certification Authorities on the server, as covered in untrusted certificate fixes.
- Old certificate still served after renewal. The binding still points at the old thumbprint. Edit the binding and choose the new certificate, or rebind it with PowerShell.
Keeping IIS certificates working
Always generate the CSR and complete the request on the same server, or work with PFX files from the start. Keep a note of each certificate's thumbprint and which bindings use it, and check expiry dates with the PowerShell listing above before they run out. After the certificate works, add an HTTP to HTTPS redirect with the URL Rewrite module, as shown in HTTPS redirects, and set security headers such as HSTS in web.config, as shown in security headers on IIS. Then run the security audit on each hostname.
1. Why is my SSL certificate not showing in IIS bindings?
Your SSL certificate is not showing in IIS bindings because it has no private key on this server, or because it is not in the Local Computer Personal or Web Hosting store. IIS only offers certificates it can actually use. Check with PowerShell whether HasPrivateKey is true and which store holds the certificate. Importing a PFX file that includes the private key into the Local Computer Personal store, or repairing the key link with certutil, normally makes it appear straight away.
2. Why does my certificate disappear after Complete Certificate Request?
Your certificate disappears after Complete Certificate Request because the private key for it is not on this server. The key is created on the machine that generated the CSR, and IIS drops the certificate from Server Certificates when it cannot pair it with a key. Complete the request on the original server and export a PFX, or run certutil repairstore if the CSR was made here. If the key is lost entirely, create a new CSR and ask the authority to reissue.
3. Why is my IIS SSL certificate not working?
An IIS SSL certificate that shows in the bindings but is not working usually has the wrong binding, a missing intermediate certificate or a hostname that is not on the certificate. Check that each hostname has its own https binding with SNI ticked, that netsh http show sslcert shows the expected certificate hash, and that the certification path is complete. Then test from another machine with curl or OpenSSL, which report the exact error rather than a general warning page.
4. What is Require Server Name Indication in IIS?
Require Server Name Indication is the IIS setting that lets one IP address and port serve different certificates for different hostnames. The browser sends the hostname at the start of the TLS handshake, and IIS picks the certificate bound to that name. Without it, a binding applies to the whole IP address and port, so every site there shares one certificate. Tick it whenever you host more than one HTTPS site on a server, and fill in the host name on each binding.
5. Can I use a .crt or .cer file in IIS?
You can use a .crt or .cer file in IIS only if the matching private key is already on the server, for example because the CSR was generated there. In that case, use Complete Certificate Request or import the file and run certutil repairstore to join it to the key. If the key was created elsewhere, a .crt file on its own will never appear in the bindings list, and you need a PFX that contains both the certificate and its private key.
6. Why does Windows say the PFX password is wrong when it is right?
Windows says the password is wrong when the PFX file was encrypted with settings it cannot read, which often happens with files made by OpenSSL 3 and imported on Windows Server 2016 or older. The password is fine, the encryption format is the problem. Rebuild the PFX with OpenSSL using the legacy option, or export it again from a Windows machine using the older TripleDES with SHA1 option, then import the new file into the Local Computer Personal store.
7. Do I need to rebind the certificate after renewal in IIS?
Yes, in most cases you must rebind the certificate after renewal, because an IIS binding points at one certificate thumbprint and a renewed certificate has a new one. Edit each https binding and choose the new certificate, or update it with PowerShell. ACME clients for Windows usually do this automatically as part of renewal. After rebinding, run netsh http show sslcert to confirm the new hash is in place, and test with curl from another machine to confirm visitors see it.
Run the security audit on each hostname to see the certificate your IIS server actually sends, its names, issuer and expiry date, and whether the chain is complete.
Open Security Audit Fixes โ