Github Pages additional custom subdomains possible, besides blog and www? - github

I created my github.io page. Additionally, I added a www subdomain, it worked well.
Now I want to add another custom subdomain with this scheme: forename.rootdomain.com. For that reason, I added another CNAME to my rootdomain and point forename also to my surname.github.io page. This results in
404: There isn't a GitHub Pages site here.
Is it possible to add additional subdomains, besides blog. and www.? Additionally, is it possible without creating new repos with gh-pages branches?
I only want to maintain one GitHub page; not additional copies of it.

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.

Is there a way to remove repository name from github page link?

I created a page for a github repository following these instructions:Getting Started with GitHub Pages. Worked perfectly, the page is already hosted.
But I would like to change the page URL, This is the currently URL: http://myusername.github.io/repositoryName/
Is there any way to remove the repository name? (http://myusername.github.io/)
I've seen the articles to configure a custom domain, but I think that's not the case.
To remove the repository name, you'll need to make it a User Page (or an Organization page). Create a repository named myusername.github.io, and commit your content to the master branch. See this help page for more information.

Different custom domains for GitHub user page and project page?

Is it possible to associate more than one custom domain with the same GitHub user account? I would like to use one custom domain for my personal page and another custom domain for a project page.
Specifically, I would like www.deeplearningbook.org to show the GitHub pages for the goodfeli/book project, and www.iangoodfellow.com to show the GitHub pages for the goodfeli/goodfeli.github.io user page. (And if I can be ambitious, I'd like blog.iangoodfellow.com to show the GitHub pages for goodfeli/blog)
I have tried a few different ways to set them up, and everything I have done has ended up with one URL or the other working but not both.
My current setup is a huge mess, but since a commenter asked me what my name records currently are:
iangoodfellow.com: I deleted all name records after the last failure. namecheap filled in a default parking page thing. I deleted the custom domain field from the goodfeli/goodfeli.github.io repository on github. Strangely, http://goodfeli.github.io successfully loads but https://goodfeli.github.io redirects to the broken www.iangoodfellow.com parking page. I'm not very happy that github is doing that... I didn't realize that taking down goodfeli.github.io was a possible failure mode here.
deeplearningbook.org: I doubt this is the correct thing to do, but it's the only thing I've been able to get to work so far:
Redirect domain: deeplearningbook.org -> https://www.deeplearningbook.org
A record # 192.30.252.153
A record # 192.30.252.154
CNAME Record www goodfeli.github.io.
It's that last CNAME record that I think is the problem. Having the goodfeli.github.io CNAME record for www.deeplearningbook.org prevents me from linking a different domain to the goodfeli.github.io personal page.
I haven't been able to figure out how to link www.deeplearningbook.org specifically to the goodfeli.github.io/dlbook project page though.
Yes in short, through one sub domain exampleUser.github.io, for example, my page https://shushugah.github.io is my main one, and maps to a custom domain https://shushugah.com while https://shushugah.github.io/23 links to a different github page at https://2Jews3Opinions.com One side effect of this is that https://shushugah.com/23 also redirects to https://2Jews3Opinions.com
I detail this in my blog post https://medium.com/#shushugah/2-customs-domains-for-2-github-pages-a8a9e77d3e57

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.