Let’s Encrypt makes it easy for everyone to use HTTPS. The Windows client letsencrypt-win-simple simplifies installing and updating certificate in IIS.
Using IIS URL Rewrite function you can allow Let’s Encrypt certificate retrieval/renewal and redirect all visitors to HTTPS URL of site.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
<?xml version="1.0" encoding="UTF-8"?> <configuration> <system.webServer> <rewrite> <rules> <rule name="Allow LetsEncrypt" patternSyntax="Wildcard" stopProcessing="true"> <match url=".well-known/*" /> <action type="None" /> </rule> <rule name="Redirect HTTP to HTTPS" patternSyntax="Wildcard" stopProcessing="true"> <match url="*" ignoreCase="false" /> <conditions> <add input="{HTTPS}" pattern="off" /> </conditions> <action type="Redirect" url="https://{HTTP_HOST}{REQUEST_URI}" /> </rule> </rules> </rewrite> </system.webServer> </configuration> |
This is exactly what I was after. Thank you
Thanks a lot!