如何让 GitHub 页面为我的 www 子域提供正确的 SSL 证书

Jos*_*Fox 6 github-pages

https://joshuafox.com显示正确。但是,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
Run Code Online (Sandbox Code Playgroud)

据说 GitHub Pages 中的这个新功能支持这一点。我该如何启用它?

tuk*_*kan 4

编辑:修改答案

要包含您的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
Run Code Online (Sandbox Code Playgroud)
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
Run Code Online (Sandbox Code Playgroud)