Subdomain of custom domain on Github pages

眉间皱痕 提交于 2019-12-14 00:23:57

问题


We are allowed to use our own custom domain with Github Pages.

For example, I have my page: http://example.com which points to http://username.github.io/project

But now I need to create a subdomain for another folder inside my repo. like

http://zuckerberg.example.com ---> which points to ---> http://username.github.io/project/zuckerberg

Is it possible to accomplish on github? I can't find any documentation about subdomain of custom domains :/

I found this so far https://help.github.com/articles/user-organization-and-project-pages but it's really confusing


回答1:


You will not be able to point a custom subdomain to http://username.github.io/project/zuckerberg. You will have to point it to another project http://username.github.io/otherproject Some more documentation https://help.github.com/articles/tips-for-configuring-a-cname-record-with-your-dns-provider and https://help.github.com/articles/about-custom-domains-for-github-pages-sites




回答2:


Examble of real-world CNAME files

The username.github.io repository has a CNAME file with the domain www.domain.com.

 - The User Pages site at username.github.io redirects to www.domain.com.
 - The Project Pages site at username.github.io/project redirects to www.domain.org/project.


来源:https://stackoverflow.com/questions/25479210/subdomain-of-custom-domain-on-github-pages

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