Let;s Encrypt on Microsoft IIS

How to install a Let’s Encrypt SSL cert on Microsoft IIS

If you’ve ever wondered how to install a Let’s Encrypt certificate on a Microsoft IIS server than this post is just for you.

Let’s Encrypt has always been pretty easy to setup on a Linux box and not so much on the Windows side. Thankfully, there are now nearly a dozen different tools that make adding a Let’s Encrypt SSL certificate to a Microsoft IIS server just as easy.

In this post we’ll be focusing in on, and using the Windows ACME Simple (WACS) solution. Mostly because it’s so easy to use, how easy? Well lets take a look!

Install Let’s Encrypt on Microsoft IIS webserver

  1. Download the latest Windows ACME Simple (WACS) ZIP file from the Github releases page, https://github.com/PKISharp/win-acme/releases.
    At the time of writing this post, it is win-acme.v2.0.3.206.zip
  2. Next extract the zip file to a folder of your choice. In this example I’m placing it in my C:\inetpub\letsencrypt folder.
    extracted letsencrypt
  3. Right click on wacs.exe and select Run as Administrator to start the Windows ACME Simple wizard.
    run wacs as admin
  4. Select N to create a new certificate.
    select N new cert
  5. Next you’ll be prompted for what kind of cert to create. Select 1 for a single binding of an IIS site.
    select 1 single binding
  6. Now select which site binding to configure. Since we only have one site on this IIS server there is only one option. Select 1.
    select site binding
  7. Enter an email address to be used for notifications about any potential issues.
    enter email
  8. Finally, agree to the Terms of service and the Windows ACME Simple program takes care of the rest.
    lets encrypt iis complete

That’s it for installing a Let’s Encrypt SSL cert on IIS.

In the background Windows ACME Simple will configure your IIS site to use the newly received Let’s Encrypt certificate. You can verify this by looking at the site binding details.

view cert

In addition Windows ACME Simple also adds a task to the Windows Task Scheduler which will automatically renew the Let’s Encrypt for you!

task scheduler

How to redirect HTTP to HTTPS in IIS

Now that you have a Let’s Encrypt SSL certificate added to your Microsoft IIS site, you will most likely want to redirect all non-secure (HTTP) traffic to HTTPS.

To do so, you will need to download and install the IIS Rewrite Module from here, https://www.iis.net/downloads/microsoft/url-rewrite.

Once that is completed, just follow the below steps.

  1. Open IIS Manager and select the website on the left and open URL Rewrite.
    http to https rewrite
  2. Click on Add Rule then select Blank rule.
    blank rule
  3. Next give the new rule a name and under Match URL change the Requested URL to “Matches the Pattern” and Using to “Regular Expressions” and for the Pattern type in (.*)
    rule name
  4. Expand the Conditions block and under Logical Grouping change the drop down to Match All and click on Add.
  5. For the Condition input type in {HTTPS} in Add Condition prompt. For Check if input string select Matches the Pattern. For Pattern enter ^OFF$
    add condition
  6. Now expand the Action block and select Redirect for the Action Type. In the Redirect URL enter: https://{HTTP_HOST}/{R:1} and set the Redirect type select Permanent (301)
    action block
  7. Finally, click Apply

I’ve been a big fan and donor of Let’s Encrypt for a long while now. Let’s Encrypt certs are automated, offer short lifetimes (90 days) and are completely FREE! What’s not to like about them?

If you’ve found this post helpful please consider donating to Let’s Encrypt!

Similar Posts

  • Who wants to win a sweet home lab?

    Turbonomic TurboStack homelab

    I’m pretty darn happy with my current home lab, but certainly wouldn’t mind winning the sweet home lab Turbonomic is giving away for FREE!

    The Turbonomic TurboStack home lab giveaway consists of an Intel NUC6i5SYK NUC with an Intel Core i5-6260U, 16GB total RAM using HyperX DDR4 memory. For storage the TurboStack home lab includes a Synology DS916+ NAS along with a Samsung 850 EVO 250GB SSD and two WD 1TB 7200 RPM SATA drives. In addition, a Cisco SG300 10-Port Gigabit Managed Switch – they even give you three Ethernet cables!

    Read More “Who wants to win a sweet home lab?”

  • How to install VisualEsxtop

    If you haven’t already heard, VisualEsxtop is a Fling developed by a few VMware Engineers that provides a java based GUI to the every useful ESXTOP. As an added bonus provides a description of each counter, multiple windows, the ability to sort metrics, and even provide basic graphs. Oh and it’s FREE!

    Setup and install on Windows 7 is pretty easy as well:

    Visual ESXtop

    Read More “How to install VisualEsxtop”

  • Welcome new site sponsor, SolarWinds!

    solarwinds

    I would like to welcome my new site sponsor, SolarWinds. SolarWinds offers a large variety of tools, management, monitoring, and analyizers for various systems.

    The one tool many readers of this blog might find more interesting is their Virtualization Manager which offers capacity planning, VM Right-Sizing, various management reports and system monitoring and works with both VMware and Hyper-V.

    Be sure to check out the video demo below, they are also offering a 30 day free trial!

    Read More “Welcome new site sponsor, SolarWinds!”

  • Be social! How to start a blog

    This year marked my first year of going to VMworld and before I left I asked several people and the Twitter’s on advice and overwhelmingly the advice was wear comfortable shoes and to be social and talk with as many people as you can. I can’t tell you just how much those two pieces of advice are really worth.

    While I was at VMworld several people told me being social has helped them immensely. From getting help when problems arise to landing their new dream job and everything in between. I even talked to a few people that was there but wasn’t really involved in the community and wanted to know how to get started.

    For me blogging has been one of the better things I’ve done as it’s not only helped me learn new things, but also help teach others. It’s something I enjoy, thought don’t do as often as I like, and figured I’d start there – how to start a blog.

    Read More “Be social! How to start a blog”

  • Top vBlog 2017 Voting has begun!

    It’s that time of year again – time to vote for your favorite blog and podcast!

    Just as he has every year, Eric Siebert from vSphere-Land.com has kicked off voting for the 2017 Top vBlog and will remain open until June 30th 2017! Eric has also made a few suggestions on what to keep in mind when voting which I certainly agree with and can be found Top vBlog 2017

    Read More “Top vBlog 2017 Voting has begun!”

  • My VMware View Windows 7 Optimization Guide

    These are the few steps I do when creating a new "Golden" image. Luckily I don’t have to do these steps all the time as I’ll create the "Golden" image when there is a new upgrade such as when we went from View 4.6 to View 5.0.1. I like to have a new fresh machine using new virtual hardware from the start. You could certainly just upgrade the virtual hardware on the "Golden" image, I just prefer to start clean.

    At any rate, here’s my list. Hopefully someone might find it somewhat useful and maybe even others can improve upon it.

    Preparing a new virtual machine

    1. Create New Virtual Machine – FILE > NEW > VIRTUAL MACHINE (CTRL+N)
    2. Under Configuration select CUSTOM.
    3. Select a Name, Folder, Host, Cluster, and Storage.
    4. Under Guest Operating System select Windows and then Windows 7 32bit under the Version drop down.
    5. Select which Network (VLAN) and under Adapter select VMXNET 3.
    6. Configure disk size to 30GB THIN provisioned.

    Read More “My VMware View Windows 7 Optimization Guide”

Leave a Reply to Michael Cancel reply

Your email address will not be published. Required fields are marked *

28 Comments

    1. Great concise notes.
      I am struggling to find instructions (searching the web) to apply these certificates to an RDS Broker / Gateway / Host residing on separate boxes.
      Most instructions assume a simple single box setup.
      Any thoughts or directions ?

    1. It’s the second one listed under Windows / IIS titled “win-acme (.NET)” or you can use the direct link I provided in the instructions above.

      -Michael

    1. You most certainly can. In step 5 instead of selection 1 for a single site you will want to select number 3 “SAN cert for all bindings of multiple IIS sites” and then select “S” to generate a wildcard for all available sites.

      -Michael

      1. Awesome thank you very much and hope it has the task for auto renew too? Thank you

    1. Alexandre,

      Windows ACME Simple creates a Windows Task to automatically update the certificate for you. However, if you want to manually renew a certificate you can do that as well. Just re-run the .EXE program and select one of the options as shown in Step 4 (R,S,A).

      -Michael

      1. What is the proper procedure to remove a certificate? Using the Revoke option of wacs? I want to change the primary name of the website. Or could I just install a new certificate and then choose the preferred primary name?

  1. Quick question if you have a redicet for http to https. will that not also cover the acme verification as well.

  2. Thanks Mike, great article. Got cert installation sorted for 2 domains in less than 30 minutes for free using LetsEncrypt!