Windows estates fail certificate renewals not because certificates are hard to issue, but because the new certificate never reaches the IIS binding, the farm node or the service that actually serves it. As public TLS certificate lifetimes shrink, a renewal process that depends on someone importing a PFX and clicking through IIS Manager will not keep up. This guide shows how to automate the whole chain on IIS and other Windows servers: public certificates through an ACME client, internal certificates through Active Directory Certificate Services (AD CS) autoenrolment, and the binding step that ties renewal to service.
It assumes you know the ACME protocol itself; for that, read our ACME and Automated Certificate Management Guide. For Linux web servers, see How to automate TLS certificate renewal on NGINX and Apache with ACME.
Key takeaways
- Pick the issuance path by audience: ACME for publicly trusted certificates, AD CS autoenrolment for internal certificates on domain-joined servers.
- Renewal is only half the job. The new certificate must replace the old one in every HTTPS binding. On IIS 8.5 and later, Automatic Rebind does this for certificates renewed in the machine store; ACME clients such as win-acme update bindings themselves.
- For web farms, IIS Centralized Certificate Store lets every node load certificates from one file share, so a renewal is one file change rather than one change per server.
- Treat the renewal job, its account and any ACME account key or PFX password as non-human identities with owners, least privilege and monitoring.
- Monitor outcomes, not jobs: alert on certificates actually served that are close to expiry, not just on scheduled task failures.
Why Windows renewals break
On Linux, a web server usually reads a certificate from a file path, so replacing the file and reloading is enough. IIS works differently. Each HTTPS binding (in HTTP.sys) points at a certificate by its thumbprint in the Windows certificate store. A renewed certificate has a new thumbprint, so the binding keeps serving the old one until someone changes it. The same is true for other Windows services that select a certificate by thumbprint, such as Remote Desktop, WinRM listeners, SQL Server and Exchange.
Common causes of Windows renewal outages:
- The certificate renewed but the binding still points at the old thumbprint.
- The certificate was renewed on one farm node but not the others.
- The renewal ran under a user account that later left or had its password changed.
- The private key was not marked for the service account that needs it, so the service cannot load the new certificate.
- Nobody knew the certificate existed until it expired.
Our Certificate Expiry Outages and 47-Day TLS Certificates Guide explains why shorter public lifetimes make these failures more frequent.
Choose the issuance path
| Certificate need | Issuance path | Binding step |
|---|---|---|
| Public website or API on IIS | ACME client against a public CA | ACME client updates the IIS binding |
| Public site on a web farm | ACME client on one node writing to Centralized Certificate Store | Nodes load from the share |
| Internal site or service on domain-joined server | AD CS autoenrolment from an enterprise CA | IIS Automatic Rebind, or a script for non-IIS services |
| Non-domain-joined or DMZ server needing internal trust | ACME or a certificate manager against an internal CA, or enrolment proxy | Client or script updates the binding |
Avoid mixing paths for one certificate. If a site's certificate is renewed both by autoenrolment and by an ACME client, the two will fight over the binding.
Public certificates on IIS with an ACME client
Several ACME clients run natively on Windows. This guide uses win-acme as the worked example because its documentation covers IIS bindings directly; the same design points apply to other clients.
Scheduling and renewal timing
The win-acme renewal documentation describes a single scheduled task that handles all certificates. It is created after the first certificate succeeds, runs daily, and renews only when needed. By default it runs at 9:00 under the SYSTEM account, and the default renewal period of 55 days can be changed in settings.json. A renewal is triggered when the certificate is getting old, when the source domain list changes (for example, a new binding on the IIS site), or when the server signals that renewal is needed, such as after a CA incident.
Shorter certificate lifetimes mean the fixed renewal period must shrink too. If your CA issues certificates shorter than the renewal period, the client will renew on every run or too late. Review the setting whenever your CA changes its validity, and prefer clients that follow the CA's own renewal guidance where the CA provides it.
How bindings are updated
The win-acme IIS installation plugin updates existing HTTPS bindings in any site that used the previous certificate, so the thumbprint problem is handled for you. It also updates HTTPS bindings in the source site whose host names match the new certificate, even if they use certificates from another CA, unless you pass --excludebindings. If no matching binding exists, it creates one on port 443 on all IP addresses by default, changeable with --sslport and --sslipaddress. On older IIS versions without SNI or wildcard binding support, the plugin may not be able to add bindings safely, so you create them once by hand and renewals are automatic after that.
Two design cautions follow. First, because existing bindings are updated wherever the old certificate was used, know where each certificate is bound before you automate it. Second, the "replace matching host names" behaviour can overwrite a certificate from another CA that someone put there deliberately; use --excludebindings where that matters.
Validation from Windows servers
- HTTP-01 needs the site reachable on port 80 from the internet. Easy for public IIS sites, awkward behind load balancers that terminate TLS.
- DNS-01 works for internal servers, wildcards and farms, but the client needs credentials to your DNS provider. Scope those to the specific zone or record and store them with the same care as the certificate's private key.
- TLS-ALPN-01 needs control of port 443, which IIS normally owns, so it is rarely practical on IIS.
Monitoring the client
win-acme writes progress to the Windows Event Log and to log files under %programdata%\win-acme, and can send email notifications when a mail server is configured. Forward the event log to your SIEM and alert on renewal failures. Its documentation recommends --renew --force --verbose for troubleshooting; in production, use a staging CA endpoint for testing so you do not hit the public CA's rate limits.
Internal certificates with AD CS autoenrolment
For domain-joined servers using an enterprise CA, autoenrolment lets Windows request and renew certificates on its own, driven by Group Policy and certificate template permissions. It is the most reliable renewal mechanism on Windows because the operating system handles it, with no extra agent.
Enable autoenrolment in Group Policy
Microsoft's server certificate autoenrolment guide gives the path: in Group Policy Management Editor, go to Computer Configuration, Policies, Windows Settings, Security Settings, Public Key Policies, and open Certificate Services Client - Auto-Enrollment. Then:
- Set Configuration Model to Enabled.
- Tick Renew expired certificates, update pending certificates, and remove revoked certificates.
- Tick Update certificates that use certificate templates.
Apply the policy to an organisational unit that contains only the servers that should enrol, and run gpupdate /force to test on one server before waiting for normal refresh.
Design the template
Duplicate a web server template rather than editing a built-in one, and, as NHI Mgmt Group advice, grant Read, Enroll and Autoenroll only to a security group that contains the target computer accounts. Set the subject to be built from Active Directory information (the server's DNS name) rather than supplied in the request. Allowing the requester to supply the subject on an autoenrolled template lets any member computer request a certificate for any name, which is one of the classic AD CS escalation paths. Our guide on How to audit AD CS certificate templates lists the template settings to check, and the AD CS Security Guide covers the CA itself.
Other template choices that affect renewal:
- Validity and renewal period. The renewal period sets how early autoenrolment renews. Leave enough margin for a server that is offline for a few days.
- Key storage. Use a modern cryptographic provider and a 2048-bit RSA or ECDSA key. Do not allow the private key to be exported unless a documented process needs it.
- Superseded templates. When you replace a template, list the old one as superseded so autoenrolment moves servers to the new one.
Bind the renewed certificate: IIS Automatic Rebind
Autoenrolment puts a new certificate in the computer store but does not touch IIS bindings. IIS 8.5 and later fixes this with Certificate Rebind. According to Microsoft's Certificate Rebind documentation:
- You enable it at the server level in IIS Manager: select the server, open Server Certificates, and click Enable Automatic Rebind of Renewed Certificate. It applies to all HTTPS sites on the server.
- Enabling it registers a scheduled task named CertificateServicesClient under Microsoft, Windows, CertificateServicesClient, keyed to the certificate renewal event with event ID 1001. Microsoft recommends not changing the task; disabling the feature deletes it.
- When the event fires, the task runs
appcmd.exewith the old and new thumbprints, finds the sites bound to the old certificate and rebinds them to the new one. - It works whether the certificate is renewed manually or by autoenrolment, and is not supported on IIS 8.0 and earlier.
Rebind relies on a genuine renewal event, so it does not help when a new certificate is enrolled from scratch rather than renewed. Test it on a staging server by renewing a certificate early and checking the binding with netsh http show sslcert.
Non-IIS services
Services outside IIS need their own rebind step. Use a scheduled task triggered by the same renewal event that runs a script to find the newest valid certificate from the right template, grant the service account read access to the private key, update the service's certificate setting and restart the service if required. Keep the script in source control, sign it, and run it under a dedicated account rather than a personal one.
Web farms and the Centralized Certificate Store
With certificates in each server's local store, Microsoft's Centralized SSL Certificate Support documentation notes, renewing a certificate must be repeated on every server. The Centralized Certificate Store, available from IIS 8.0, lets farm nodes load certificates on demand from a file share instead.
- Files are named after the host name, for example
www.contoso.com.pfx, with wildcards as_.contoso.com.pfx. Certificates with several names need one file per name. - IIS picks the certificate by matching the SNI value or host name to the file name. The binding is a host name and port binding with no certificate hash, so renewal does not change the binding at all.
- The store uses a UNC path and a configured account with read access to the share, and supports either no PFX password or one global password.
- SNI is not required, but the store works properly with it.
For renewal, run the ACME client or export process on one controlled node and have it write the renewed PFX to the share. win-acme lists a Centralized Certificate Store installation plugin for this purpose. Every node picks up the new file without its own renewal job.
The share now holds every private key for the farm, so treat it as a secrets store: restrict write access to the renewal identity, restrict read access to the account IIS uses, audit access, and rotate the global PFX password through a process rather than leaving it unchanged for years.
Identities and secrets in the renewal chain
Every automated renewal on Windows involves non-human identities, and each needs an owner:
| Identity or secret | Risk | Control |
|---|---|---|
| Scheduled task account (SYSTEM or a service account) | Broad local rights; personal accounts break when people leave | Dedicated account or group managed service account, documented owner |
| ACME account key | Can request certificates for your validated names | Protected file permissions, CAA records naming your CA and account |
| DNS API credentials for DNS-01 | Can change DNS records | Scope to the validation record or zone, store in a vault |
| Centralized store share account and PFX password | Access to every farm private key | Least privilege, rotation, access auditing |
| Computer accounts with Autoenroll rights | Can obtain certificates from the template | Narrow security group, subject built from AD |
For hardening the web server around these certificates, see our IIS Hardening Guide.
Rolling out and measuring
- Discover. Inventory certificates in use on each Windows server, including bindings from
netsh http show sslcertand non-IIS services. Record the issuer, expiry and owner. - Classify. Assign each certificate to ACME, autoenrolment or a documented manual exception.
- Pilot. Automate a few low-risk sites, force early renewals and confirm the binding changes.
- Scale. Roll out by server group, with monitoring in place before the first real renewal.
- Retire manual steps. Remove old runbooks that import PFX files by hand, so nobody undoes the automation.
Measure the share of certificates renewed automatically, the number of manual exceptions, renewal failures per month and the minimum days to expiry across all served certificates. External monitoring that connects to each endpoint and reads the served certificate catches the cases where renewal succeeded but binding did not. Our Certificate Renewal Runbook Template covers the manual fallback.
Framework mapping
- NIST SP 800-53 SC-12 (Cryptographic Key Establishment and Management): automated, policy-driven issuance and renewal of keys and certificates.
- NIST SP 800-53 SC-17 (Public Key Infrastructure Certificates): certificates issued under an approved policy from a known CA.
- NIST SP 800-53 IA-5 (Authenticator Management): server certificates are authenticators that need lifecycle control.
Common failure patterns
- Renewal succeeds, binding still points at the old thumbprint, site serves an expired certificate.
- Two mechanisms (autoenrolment and an ACME client) renewing the same certificate and overwriting each other's binding.
- Renewal task created under an administrator's personal account.
- Autoenrolment templates that let the requester supply the subject name.
- Farm nodes renewed one by one, with one forgotten node serving an expired certificate behind the load balancer.
- Centralized store share readable by too many accounts, exposing every farm private key.
- A fixed renewal period longer than the CA's new certificate lifetime.
- Monitoring only scheduled task results and never checking the served certificate.
Practitioner checklist
- Inventory every certificate and binding on Windows servers, including non-IIS services.
- Assign one issuance path per certificate: ACME, autoenrolment or documented exception.
- Configure the ACME client's scheduled task under a dedicated identity and review its renewal period against CA lifetimes.
- Scope DNS-01 credentials and store them in a vault.
- Enable Certificate Services Client - Auto-Enrollment with both renewal options for target server OUs only.
- Use duplicated templates with subject built from AD and Autoenroll granted to a narrow group.
- Enable IIS Automatic Rebind on IIS 8.5 and later servers that use autoenrolled certificates.
- Use the Centralized Certificate Store for farms and lock down the share.
- Script and sign rebind steps for non-IIS services.
- Monitor served certificates externally and alert well before expiry.
Standards and references
- Microsoft Learn: Certificate Rebind in IIS 8.5
- Microsoft Learn: Configure server certificate autoenrollment
- Microsoft Learn: IIS 8.0 Centralized SSL Certificate Support
- win-acme: Automatic renewal
- win-acme: IIS installation plugin
- IETF: RFC 8555, Automatic Certificate Management Environment (ACME)
- NIST: SP 800-53 Rev. 5
Related NHI Mgmt Group resources: ACME and Automated Certificate Management Guide · AD CS Security Guide · Certificate Expiry Outages and 47-Day TLS Certificates Guide · IIS Hardening Guide