一般申請SSL域名安全證書時,有兩種驗證域名所有權的方式:
- 域名驗證
- 檔案驗證
其中檔案驗證就是在web伺服器上放置一個指定檔案,傳回指定内容。
域名驗證是要在域名解析中增加一個txt項,值為指定内容。
例如,域名是example.com,為www.example.com申請證書,
那麼就在example.com上增加一個 txt項,名字是@ (即代表example.com),值為指定内容。
使用nsloopup查詢:
nslookup -qt=txt example.com 8.8.8.8
或者,還可以把值設定到 _dnsauth 上。
nslookup -qt=txt _dnsauth.example.com 8.8.8.8