我怎样才能获得 GitHub 页面来为我的 www 子域提供正确的 SSL 证书

How can I get GitHub pages to give a correct SSL certificate for my www subdomain

https://joshuafox.com shows correctly. However, https://www.joshuafox.com 出现 SSL 证书错误。

DNS 记录似乎是正确的,如 dig 所示,并且 http://www.joshuafox.com(无 HTTPS)正确重定向。

$ dig www.joshuafox.com
...
;; ANSWER SECTION:
www.joshuafox.com.  86400   IN  CNAME   joshuafox.com.
joshuafox.com.      3600    IN  A   185.199.109.153

This new feature in GitHub Pages 据说支持这一点。如何启用它?

编辑: 大修答案

要包含您的 www apex,您应该将此行添加到域 DNS 记录:

CNAME www.joshuafox.com joshuafox.github.io 86400

如果你使用 dig 它应该看起来像:

dig www.joshuafox.com +nostats +nocomments +nocmd
;www.joshuafox.com.             IN      A
www.joshuafox.com.      86400   IN      CNAME   joshuafox.github.io.
joshuafox.github.io.    3600    IN      A       185.199.109.153
joshuafox.github.io.    3600    IN      A       185.199.110.153
joshuafox.github.io.    3600    IN      A       185.199.111.153
joshuafox.github.io.    3600    IN      A       185.199.108.153
dig joshuafox.com +nostats +nocomments +nocmd
;joshuafox.com.                 IN      A
joshuafox.com.          3600    IN      A       185.199.110.153
joshuafox.com.          3600    IN      A       185.199.111.153
joshuafox.com.          3600    IN      A       185.199.108.153
joshuafox.com.          3600    IN      A       185.199.109.153