使用 github 页面设置自定义 https 子域?

Setting up custom https sub domains with github pages?

如果我们想要自定义域 example.com 和我们的 github 页面,那么我们只需进入设置并添加 example.com,并假设我们已经添加了 A 记录@ 给我们的域名注册商,这对 IIUC 有效。

现在,如果我们还想要另一个 github 存储库的子域 sub.example.com,我们是否在自定义域的存储库设置面板中输入 sub.example.com?我假设这就是我们所要做的,假设 sub 的 A 记录已经设置?

我已经试过了 post 我收到了这条 github 消息:

Your site's DNS settings are using a custom subdomain, sub.example.com, that's set up as an A record. We recommend you change this to a CNAME record pointing at [YOUR USERNAME].github.io. For more information, see https://help.github.com/articles/setting-up-a-custom-domain-with-github-pages/.

为什么 github 推荐这个?消息中包含参考 URL,但它是关于如何设置 github 自定义域的通用说明 link,没有关于子域的具体说明。

来自GitHub的消息非常清楚,根据其文档:

You can set up a custom subdomain, such as blog.example.com, by creating a CNAME record through your DNS provider.

也就是说,您应该使用CNAME记录,而不是A记录,并将其指向[您的用户名]。github.io。