有个问题关于域名绑定~
我现在想把 tvshow.ybmimo.com 绑定到 项目 yb-mimo/tvshow 的话, 应该怎么弄?
- gh-pages分之下的CNAME文件写入 tvshow.ybmimo.com
- 域名解析上 添加 CNAME记录 到 yb-mimo.github.io
这样对么。。? 第二步有点不太理解, 纠结的原因是 项目不是 yb-mimo/yb-mimo.github.io 所以是否应该在 添加解析记录的时候 将 CNAME 解析到 yb-mimo.github.io/tvshow ?
第二步应该是将tvshow.ybmimo.com CNAME到204.232.175.78吧。后者是github-pages的,会接管后续处理。
https://help.github.com/articles/my-custom-domain-isn-t-working 按照 help上写的 In order to serve the Pages, your DNS needs to point at our server. If you are serving a top-level domain like example.com, you should have an A record pointing to 204.232.175.78. If you are using a subdomain like www.example.com, you should have a CNAME record pointing to [your-username].github.io 所以应该是将CNAME 添加到 yb-mimo.github.io吧。。
If you are working with a user pages repository, this should be done in the master branch. If you're working with project pages, then it should go in the gh-pages branch of the project repository.
https://help.github.com/articles/setting-up-a-custom-domain-with-pages
所以应该是在你的分支里,CNAME文件里面写tvshow.ybmimo.com
嗯 这个 issue可以关掉了,刚试了下, 我的username 是 wutong, yb-mimo是 我建力的 组织。 但是 yb-mimo/tvshow 是 我创建的, 所以 添加解析的时候 应该 将 tvshow.ybmimo.com 解析到 CNAME wutong.github.io 测试成功。