How to install a free SSL certificate on IIS with Let’s Encrypt
You can secure a Windows IIS website with a free, trusted certificate from Let’s Encrypt. You need an ACME client on the server to request the certificate, bind it to your site and renew it automatically. This guide covers the prerequisites, the setup steps, the HTTP to HTTPS redirect and the errors people hit most often.
What you need before you start
- Administrator access to a Windows Server running IIS.
- A domain name whose DNS A record points to the server’s public IP address.
- An IIS site binding on port 80 with the exact host name (for example
example.com), not a blank host name. - Ports 80 and 443 open in Windows Firewall and any network firewall. Port 80 is used for domain validation.
Step 1: Check your IIS binding
In IIS Manager, select your site, choose Bindings, and confirm there is an HTTP binding on port 80 with your domain as the host name. Add one for www as well if you want both names covered. ACME clients use the host name to find the right site and to validate the domain.
Step 2: Request and install the certificate
Choose an ACME client that runs on Windows:
- win-acme is a free command-line client with a guided menu.
- Certify The Web is a GUI client with a free tier. Check its licence terms for commercial use.
- SSLense is a free, open-source GUI and CLI tool built for IIS, with automatic renewal and rollback if a new binding does not work.
Whichever you use, run it as Administrator, select your IIS site and host names, and enter an email address for expiry notices. The client proves you control the domain, downloads the certificate, imports it into the Windows certificate store and adds an HTTPS binding on port 443.
Tip: if you are testing, use the Let’s Encrypt staging environment first. It avoids rate limits, although staging certificates are not trusted by browsers.
Step 3: Test the HTTPS site
Open https://yourdomain.com in a browser and check for the padlock. Look at the certificate details to confirm the issuer is Let’s Encrypt and note the expiry date. Let’s Encrypt certificates have short lifetimes, so automatic renewal is not optional.
Step 4: Redirect HTTP to HTTPS
Install the IIS URL Rewrite module, then add this rule inside <system.webServer> in your site’s web.config:
<rewrite>
<rules>
<rule name="HTTP to HTTPS" stopProcessing="true">
<match url="(.*)" />
<conditions>
<add input="{HTTPS}" pattern="off" ignoreCase="true" />
</conditions>
<action type="Redirect" url="https://{HTTP_HOST}/{R:1}" redirectType="Permanent" />
</rule>
</rules>
</rewrite>
After the redirect works, fix any hard-coded http:// links in your pages, scripts and APIs. They trigger mixed-content warnings. Consider enabling HSTS only once you are sure everything works over HTTPS.
Step 5: Make sure renewal works
Renewal is the part that fails quietly. Check three things:
- The scheduled task or service from your ACME client exists and runs under an account that can edit IIS bindings and the certificate store.
- Its last run result shows success. Force one renewal manually to test the whole chain.
- You have an external expiry monitor or alert, so a silent failure is caught before visitors see a certificate error.
Common errors and fixes
Validation fails or times out
Port 80 is usually blocked, or DNS does not yet point to the server. Check the firewall, any router or cloud security group, and that the A record is correct.
Challenge file returns 404
Your app may route every request through MVC or a catch-all rule, or block extensionless files. Make sure /.well-known/acme-challenge/ is served as static content.
“No binding found” or wrong site selected
The IIS binding has no host name or the wrong one. Edit the binding so it has the exact domain.
Browser still shows “not secure”
Check for mixed content, an HTTPS binding attached to the wrong certificate, or an old cached page.
Old devices cannot connect
Very old clients may not trust the Let’s Encrypt root certificates. Test legacy integrations before switching.
Do you need a paid certificate?
Usually not. Free domain-validated certificates give the same encryption as paid ones. You would choose a paid certificate if you need organization or extended validation, a warranty or vendor support, or you cannot automate renewal.