Subdomain of website for Github pages project

瘦欲@ 提交于 2019-12-20 10:26:41

问题


I have a Github project, github.com/jeti/matrix, and I set up a "Github pages" site for the project so that it is accessible here jeti.github.io/matrix/.

That is all configurable through Github.

Now, I would like to add a subdomain of my personal website so that the website is accessible via the subdomain matrix.jeti.io of my website jeti.io.

I am just really confused how to do that because the documentation don't seem to show how to redirect a project page to a subdomain. I have tried a few permutations of what I think should be the correct inputs, but because these DNS changes take so long to propagate, it is really hard to test.

Specifically, I would like to know what value to enter into Github as the Custom domain (it seems to me that this should simply be the subdomain matrix.jeti.io, but I am not sure, so I have left this blank):

Then I also need to create the subdomain. I bought the domain through OVH, and they provide a few options for adding a DNS entry:

My understanding is that I need to add 2 apex records. I did that already:

What is unclear to me is whether I also need to add a CNAME entry. This is what the form looks like when I try to add a CNAME entry:

So in recap:

  1. I did not specify the Custom Domain on the Github site.
  2. I created the 2 apex records shown above.
  3. I did not create a CNAME entry.

Please tell me which of these steps needs to be changed and how to modify it.


回答1:


After more trial and error, the answer seems to be

  1. The Github custom domain should indeed be matrix.jeti.io

  2. I did not need the apex records. In fact, Github emailed me discouraging it. So I deleted the apex records.

  3. In OVH, I added a DNS CNAME entry like this:

The thing that was confusing me is that I thought that the CNAME entry needed to have a link to the original Github pages WITH the project name jeti.github.io/matrix. That was wrong. The target is simply jeti.github.io. (Note the period on the end).



来源:https://stackoverflow.com/questions/46455900/subdomain-of-website-for-github-pages-project

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!