I'm using GitHub pages to host my blog. I've set up a CNAME record in the repository and added an A record and CNAME record to my domain registrar (123-reg). This is working fine so now my personal page donskifarrell.github.com -> donalfarrell.com.
This also makes all my project pages map to the same new domain, eg. donskifarrell.github.com/calex -> donalfarrell.com/calex.
While this is quite nice to have, it is proving to be troublesome for one of my projects.
Is there any way to modify my setup so that certain project pages do not use my own custom domain and instead retain the github url?
Thanks
Removing a custom domainOn 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," click Remove.
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.
Go to your GitHub Pages repo, click Settings and below GitHub Pages, under Custom domain, enter your custom domain and click Save.
There isn't really a way to prevent the redirect from happening.
However, if it will help to have that project at a different domain or a subdomain, you can use a CNAME
file in the project's gh-pages
branch to override your user redirect with a project-specific one.
See more info at the bottom of: https://help.github.com/articles/user-organization-and-project-pages
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