Custom domain for github project pages - github

I have a custom domain name (www.example.com) pointing to my github user page (user.github.com). Is it possible to have a second custom domain name like www.newdomain.com pointing to a project page of the same github account (user.github.com/project)?
I was able to correctly set up the CNAME in the gh-page branch of user.github.com/project, but I seem not able to correctly set up the DNS on my domain name provider (he seems not to like the subfolder /project).
Thanks a lot for all the help you can provide me!

Actually I solved the issue...
I had to point the DNS only to my main github user name. The CNAME in the gh-page branch of user.github.com/project took care of the rest and now www.newdomain.com correctly points to user.github.com/project while www.example.com points to (user.github.com

Related

Custom domain for GitHub repo page

I have set up custom domain for my repo project page on DOMAIN.COM. But how can set it as DOMAIN.COM/REPO instead?
According to the help page, this should be the default.
Here's the response from Github. I don't think this is well-documented on the help page (or I missed it).
To do that, your DOMAIN.COM should be set in your primary repo, i.e. the one name username.github.io. This would be our main repo. Any other repo in our profile for which we've setup GitHub Pages, would start serving at DOMAIN.COM/repoName
You can read more here: [https://help.github.com/en/github/working-with-github-pages/about-github-pages#types-of-github-pages-sites]
A discussion from Stackoverflow about this: [Can I create more than one repository for github pages?

GitHub pages "There isn't a GitHub Pages site here."

TL;DR: Changed my GH-Pages domain to a custom one, the custom one works well but the default (old) one is not redirecting to the custom one.
I have a GitHub pages repo that was on the default domain, then switched it to a custom domain, which worked fine, and the default domain was redirecting to the new one. I then changed the repo's name to the new domain's name, but when I went to the old domain, it returned 404, so I changed the repo's name back to the default one (mohamed3on.github.io), but it still returns 404 and says
There isn't a GitHub Pages site here.
The repo contains a CNAME with mohamed3on.online.
What do you think I should change?
Please make sure you have been included CNAME in the root directory.

Github pages not accessible after deleting CNAME

I had a working github pages before at http://igghub.github.io/
I was trying to figure out how to add custom domain. I followed this guide from gh-pages on how to add custom domain. On my repo's Custom Domain setting, I nonchalantly added iggy.io and saved it. Silly me, I did not create DNS (I didn't know what it was until now).
Naturally, when I typed either igghub.github.io or iggy.io, it didn't work. So I deleted the iggy.io custom domain and saved it.
However, I am still unable to access github pages even after I cleared out custom domain! Everytime I try going to igghub.github.io it still redirects to iggy.io.
The last 2 commits showed that CNAME was finally deleted.
Why can't I access my old github-pages and why does github-pages still redirect me to the deleted custom domain?
Try clearing your browser cache, may have a temp or perm HTTP redirect stored in there

How to stop redirecting to custom domain?

Some years ago I added a custom domain from free site just to try a new feature of Github. Now that I want to make a page my main url keeps getting redirect to myexpireddomain.com ...
http://myuser.github.io => myexpireddomain.com
http://myuser.github.io/page => myexpireddomain.com/page
and this all results in 404...since domain doesn't exist.
I think I need to remove cname file somewhere. But out 20 repos that I have I don't see any that should cname... which repo is at the root domain. http://myuser.github.io
For removal of custom domain, I removed all of the text from the custom domain field in the settings for that particular website, then pressed save. Then, I found out that you have to clear the browser cache (in google chrome I just cleared all of the browsing data for the last hour), otherwise it will still redirect to the custom domain!
Also, make sure that the CNAME file in your repository is deleted. Github pages creates this for you when you add a custom domain.
The repository for your main domain is either myuser.github.io, as documented on the Pages website, or possibly myuser.github.com in case your site is from before GitHub started using github.io for Pages.
Check the master branch for a file called CNAME in the repository root.

GitHub pages custom domain infinite redirect loop

I'm having an absolute nightmare trying to setup a custom TLD domain with github pages.
For some reason http://www is redirecting to http:// and then back to http://www over and over in an infinite redirect loop.
My settings with 123-reg are:
DNS ENTRY TYPE TARGET/DESTINATION
# A 204.232.175.78
www CNAME scottyv.me.
And i have a CNAME file setup correctly in my repo.
Can someone please tell me what i'm doing wrong?
Not sure if you have solved this yet, but I had a similar problem with redirects and 123-reg. I think what you are missing is another 'www' DNS Entry that points to the IP Address defined for DNS Entry '#'.
I wrote a quick blog post on it, with some images
Hope this helps.
I had a similar problem. In my case, my DNS was correct (Network Solutions), but I had left out the "www" in my CNAME file. I had "yoursite.com" instead of "www.yoursite.com". Once I added the "www", the infinite redirects were fixed.
This is my third Github Pages site I'm setting up and I honestly think you just need to give it some time for their configuration to properly update. It may seem like doing additional configuration helps, but in reality, it's simply that time has elapsed. It can take several hours!
For instance, my CNAME file doesn't have a www and it works just fine!