Free SSL certificate on IIS with Let's Encrypt: ACME, SNI bindings and renewal
How to get a free Let's Encrypt SSL certificate for IIS on Windows Server: how ACME validation works, how to bind certificates with SNI for many sites on one IP, how renewal must be automated, and how win-acme and Zopanel each handle it.

Key takeaways
- Let's Encrypt issues free certificates through the ACME protocol; IIS has no built-in ACME client, so you need one such as win-acme, Posh-ACME or a control panel.
- HTTP-01 validation needs port 80 open and /.well-known/acme-challenge/ reachable; wildcards need DNS-01.
- Use SNI bindings (SslFlags 1) so many HTTPS sites can share one IP address.
- Certificates are short-lived, so renewal must be automatic and must rebind IIS.
You can get a free SSL certificate for IIS from Let's Encrypt by running an ACME client on the server: it proves you control the domain, receives the certificate, puts it in the Windows certificate store and binds it to the IIS site. IIS has no ACME client of its own, so you use a tool such as win-acme or Posh-ACME, or a control panel that includes one. The parts that need care are the validation method, SNI bindings when several sites share an IP address, and renewal, which must run by itself.
How Let's Encrypt validation works
Let's Encrypt only issues a certificate after an ACME challenge succeeds for every name on it:
- HTTP-01: the client places a token at
http://<name>/.well-known/acme-challenge/<token>and Let's Encrypt fetches it over port 80. This is the simplest choice for IIS sites. Port 80 must be open from the Internet, even if the site will only serve HTTPS. - DNS-01: the client creates a
_acme-challengeTXT record. It is the only method that can issue wildcard certificates (*.example.com), and it needs API access to your DNS provider. - TLS-ALPN-01: validation on port 443 with a special certificate. Few Windows clients support it with IIS.
Before you request anything, check that every name resolves to this server, including IPv6:
Resolve-DnsName example.com -Server 1.1.1.1
Resolve-DnsName www.example.com -Type AAAA -Server 1.1.1.1
An AAAA record pointing somewhere else is a common cause of failure, because Let's Encrypt prefers IPv6 when a record exists.
Things that break HTTP-01 on IIS:
- an HTTP to HTTPS redirect that sends the challenge to a site with a broken certificate. Exclude
/.well-known/acme-challenge/from the redirect, as shown in redirect HTTP to HTTPS on IIS; - a CDN or proxy in front of the site answering the request itself;
- a
CAArecord that does not listletsencrypt.org; - a static file handler that refuses the extensionless token file. If you get 404 on the token, add a
web.configin.well-known\acme-challengewith a MIME map for.(extensionless) astext/plain, or let your client do it.
Option 1: win-acme
win-acme (wacs.exe) is a free, open-source ACME client made for Windows and IIS. Download the x64 release, unzip it to a permanent folder such as C:\Tools\win-acme, and run it as Administrator:
C:\Tools\win-acme\wacs.exe
The interactive menu reads your IIS sites and bindings, lets you pick the host names, validates over HTTP-01 (it can serve the token through IIS for you), stores the certificate in the Windows store, creates or updates the HTTPS binding and registers a Windows scheduled task that renews certificates. After the first run, check that task exists in Task Scheduler and that its account can run while nobody is logged on.
win-acme also supports unattended command-line use and DNS-01 through plugins for many DNS providers; see its documentation for the exact arguments of your version.
Option 2: bind a certificate yourself with SNI
Whichever client you use, it helps to know what the binding looks like. With Server Name Indication (SNI), the browser sends the host name in the TLS handshake, so IIS can choose the right certificate for each site on one IP address. Without SNI, there can only be one certificate per IP and port.
Create an SNI binding and attach a certificate from the store:
Import-Module WebAdministration
New-WebBinding -Name 'example.com' -Protocol https -Port 443 `
-HostHeader 'example.com' -SslFlags 1
$cert = Get-ChildItem Cert:\LocalMachine\WebHosting |
Where-Object { $_.Subject -eq 'CN=example.com' } |
Sort-Object NotAfter -Descending | Select-Object -First 1
(Get-WebBinding -Name 'example.com' -Protocol https -HostHeader 'example.com').
AddSslCertificate($cert.Thumbprint, 'WebHosting')
SslFlags 1 turns on SNI. The WebHosting store is made for many site certificates; My (Personal) works too. Check the result with:
netsh http show sslcert hostnameport=example.com:443
Each host name (example.com, www.example.com) needs its own binding, and the certificate must cover both names.
Renewal: automate it or it will expire
Let's Encrypt certificates are short-lived: 90 days today, and Let's Encrypt has announced shorter lifetimes in the coming years. Manual renewal is not a plan. A working renewal must:
- run on a schedule (daily is fine; clients renew well before the expiry date, not on it);
- pass the challenge again, so the DNS, port 80 and redirect rules above must stay correct;
- import the new certificate and update every binding that used the old thumbprint;
- alert you when it fails.
Find certificates that expire soon:
Get-ChildItem Cert:\LocalMachine\WebHosting, Cert:\LocalMachine\My |
Where-Object { $_.NotAfter -lt (Get-Date).AddDays(21) } |
Select-Object Subject, NotAfter, Thumbprint
Run that from a monitoring check, not by hand.
Common errors
| Error | Likely cause |
|---|---|
| Timeout or connection refused | Port 80 closed in Windows Firewall or at your provider |
| 404 on the challenge URL | Request reached another site (missing host binding) or a rewrite rule caught it |
| "Unauthorized" with an unexpected response | Redirect, CDN or WAF in front of the challenge |
| CAA error | CAA record does not allow Let's Encrypt |
| Rate limited | Too many failed attempts or duplicate certificates; wait and test against the staging environment first |
FAQ
Is a Let's Encrypt certificate as secure as a paid one?
The encryption is the same. Paid OV and EV certificates add organisation checks and sometimes warranties; they do not make the connection stronger.
Can I get a wildcard certificate for IIS from Let's Encrypt?
Yes, but only with DNS-01 validation, which needs an ACME client that can update your DNS zone.
How many HTTPS sites can share one IP address on IIS?
With SNI bindings, many. Every modern browser sends SNI.
Does IIS renew Let's Encrypt certificates by itself?
No. The ACME client you install does, through a scheduled task or a service.
In Zopanel for Windows
Zopanel has its own ACME client, so you do not install win-acme. After an administrator accepts the Let's Encrypt terms once, each site's Domain and HTTPS tab requests a certificate over HTTP-01, stores it in the Windows certificate store with a private key that cannot be exported, binds it with SNI and renews it automatically. Always use HTTPS adds the redirect and keeps the challenge path reachable. This is available on Server 2019, 2022 and 2025. Two honest limits: DNS-01 and wildcard certificates are not supported yet, and there is no upload form for purchased website certificates yet. See SSL certificates and the SSL feature page. Try it on the Free plan: download, or see pricing.
Put your Windows servers on Zopanel
Start free with 1 server and 10 websites on Windows Server 2022 or 2025, or talk to us about moving from Plesk and about licenses for several servers.
Free for 1 server, 10 websites · No credit card · Signed MSI
Keep reading

Hosting ASP.NET and PHP side by side on IIS
A practical guide to running PHP, ASP.NET 4.x, ASP.NET Core and Classic ASP sites on one Windows Server with IIS, and what a panel should handle for you.

How to deploy ASP.NET Core to IIS: Hosting Bundle, web.config and 500.30 fixes
Step by step, deploy an ASP.NET Core app to IIS on Windows Server: install the Hosting Bundle, pick in-process or out-of-process hosting, set up a No Managed Code pool and web.config, and fix 500.30, 500.31 and 502.5.

How to install PHP on IIS: FastCGI, php.ini and several PHP versions per site
Install PHP on IIS 10 with FastCGI on Windows Server 2019, 2022 or 2025, configure php.ini for IIS, run different PHP versions on different sites, and replace .htaccess with URL Rewrite.