Let’s Encrypt と SSL証明書
SSL証明書は「認証局」と呼ばれる第三者機関によって発行される電子証明書です。
これは「このドメインはちゃんと実在しており、管理者も定められている」ということを、第三者機関が確認・証明してくれるものです。
通常は、証明機関から年単位で有償で購入する形になるのですが、Let’s Encryptというサービスを使うとSSL証明書を無料で取得することが出来ます。
ただ、Let’s Encryptで取得できる証明書の有効期限は発行日から90日という制限が\ありますが、専用アプリを利用すると自動更新することかできます。
(更新期限が30日以内になると自動的に90日期限の証明書を取得)
自動更新プログラムであるwin-acmeを利用すると
IIS等で利用可能な証明書を取得できます。
特にIISの場合、1つの作業で証明書の発行からIISのSSL設定、証明書自動更新スケジュール設定まで
自動でやってくるので非常にお手軽です。
SSL証明書取得のための前提条件
IIS設定時の条件としては以下のような感じです。
・DynaicDNSなどで、インターネットからアクセス可能なドメインを取得していること。
[ここでは nsb.homeip.net をドメインとします。]
・IISでhttp(:80)で通信可能な形で設定(バインドの設定でアクセスできるホスト名を登録しておくこと)
[設定時点では、https(:443)で接続できていなくても可]

・IISにhttpでインターネット経由でアクセスできていること
[http(:80)やhttps(:443)をIISで処理できるように、ルータやDMZ設定などが実施されていること]
自動更新プログラムのダウンロード
自動更新プログラムダウンロードは以下から取得できます。
A simple ACMEv2 client for Windows (for use with Let’s Encrypt et al.)
https://www.win-acme.com/
2025/05/17時点での最新版:「win-acme.v2.2.9.1701.x64.pluggable.zip」です
このファイルを任意のディレクトリに展開します。
例 C:\Tools\win-acme
win-acmeを配置したフォルダの wacs.exe を管理者として実行します。
ここでは、N:Create certificate (default settings)のモードで進めます。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 |
A simple Windows ACMEv2 client (WACS) Software version 2.2.9.1701 (release, pluggable, standalone, 64-bit) Connecting to https://acme-v02.api.letsencrypt.org/... Connection OK! Scheduled task not configured yet Please report issues at https://github.com/win-acme/win-acme N: Create certificate (default settings) M: Create certificate (full options) R: Run renewals (0 currently due) A: Manage renewals (0 total) O: More options... Q: Quit Please choose from the menu: N Running in mode: Interactive, Simple Please select which website(s) should be scanned for host names. You may input one or more site identifiers (comma-separated) to filter by those sites, or alternatively leave the input empty to scan *all* websites. 1: Default Web Site (1 binding) Site identifier(s) or <Enter> to choose all: 1 1: nsb.homeip.net (Site 1) Listed above are the bindings found on the selected site(s). By default all of them will be included, but you may either pick specific ones by typing the host names or identifiers (comma-separated) or filter them using one of the options from the menu. P: Pick bindings based on a search pattern A: Pick *all* bindings Binding identifiers(s) or menu option: A 1: nsb.homeip.net (Site 1) Continue with this selection? (y*/n) - yes Source generated using plugin IIS: nsb.homeip.net Terms of service: C:\ProgramData\win-acme\acme-v02.api.letsencrypt.org\LE-SA-v1.5-February-24-2025.pdf Open in default application? (y/n*) - yes Do you agree with the terms? (y*/n) - yes Enter email(s) for notifications about problems and abuse (comma-separated):administrator@nsb.homeip.net Plugin IIS generated source nsb.homeip.net with 1 identifiers Plugin Single created 1 order [nsb.homeip.net] Authorizing... [nsb.homeip.net] Authorizing using http-01 validation (SelfHosting) [nsb.homeip.net] Authorization result: valid Downloading certificate [IIS] Default Web Site, (any host) Store with CertificateStore... Installing certificate in the certificate store Adding certificate [IIS] Default Web Site, (any host) @ 2025/5/17 in store WebHosting Adding certificate CN=R10, O=Let's Encrypt, C=US in store CA Installing with IIS... Adding new https binding *:443:nsb.homeip.net Committing 1 https binding changes to IIS while updating site 1 Adding Task Scheduler entry with the following settings - Name win-acme renew (acme-v02.api.letsencrypt.org) - Path C:\Tools\win-acme - Command wacs.exe --renew --baseuri "https://acme-v02.api.letsencrypt.org/" - Start at 09:00:00 - Random delay 04:00:00 - Time limit 02:00:00 Adding renewal for [IIS] Default Web Site, (any host) Next renewal due after 2025/7/11 Certificate [IIS] Default Web Site, (any host) created N: Create certificate (default settings) M: Create certificate (full options) R: Run renewals (0 currently due) A: Manage renewals (1 total) O: More options... Q: Quit Please choose from the menu: |
エラーが発生しなければ、これで証明書の取得や、IISの設定、更新スケジュールの更新まで完了しています。
サイトバインド情報

httpsのサイドバインド情報

発行、設定された証明書詳細

Edgeでhttps通信すると、証明書エラーにならずに表示されます。

あとは、必要であればWebコンテンツ側の調整して完了です。
この辺を参考にWeコンテンツ側の設定を貯制します。
WordPressサイトを常時SSL化(http→https)する全手順を丁寧に解説 – UPDATE