主域在别处时创建 Github Pages 子域

Create a Github Pages subdomain while main domain is elsewhere

我正在尝试使用 Github 页面托管自定义子域。

我的顶级域 (http://example.com) 指向自定义服务器(不是 Github 页面)。

我正在尝试获取此 (http://subdomain.example.com) 的子域以在项目页面之外托管 Github 页面站点。

我已经为指向 http://username.github.io 的子域创建了一个 CNAME 记录,但它出现了这个错误:

Your site's DNS settings are using a custom subdomain, subdomain.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 组织并将 CNAME 指向 organisationname.github.io 但结果相同。

在这两种情况下,我都等待 24 小时让 DNS 传播。

我尝试按照官方教程进行操作并在 Whosebug 中搜索答案,但未能找到针对这种情况的任何信息。

我的 http://example.com 域的 A 记录甚至可能影响它下面的所有子域吗?

找到了 Github 支持的解决方案。

原来答案是是的,你可以。我刚刚将我的顶级域配置为使用 Cloudflare,但完全忘记了它。我在 Cloudflare 中进行了原始 post 中描述的更改,一切正常。