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
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.
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.
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).
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With