Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Subdomain of custom domain on Github pages

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

like image 824
Frondor Avatar asked Aug 25 '14 04:08

Frondor


People also ask

Can you use a custom domain with GitHub Pages?

You can customize the domain name of your GitHub Pages site. GitHub Pages is available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server.

How do I point my custom domain to GitHub?

On GitHub, navigate to your site's repository. Under your repository name, click Settings. In the "Code and automation" section of the sidebar, click Pages. Under "Custom domain", type your custom domain, then click Save.

What is the difference between subdomain and custom domain?

The subdomain option allows you to choose a subdomain of totalwebsiteprotection.com (mycompany.totalwebsiteprotection.com). No extra setup is required! 2. For even more control, the custom domain option allows you to use any domain you like (backups.mycompany.com).


2 Answers

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://docs.github.com/en/github/working-with-github-pages/managing-a-custom-domain-for-your-github-pages-site.

like image 159
David Jacquel Avatar answered Oct 20 '22 16:10

David Jacquel


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.
like image 37
Raja Simon Avatar answered Oct 20 '22 15:10

Raja Simon