How to stop redirecting to custom domain? - github

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.

Related

Redirect Github homepage to custom homepage

I used to host my webpage on username.github.io.
I have now set up a new webpage on username.com, and has no relation to username.github.io.
However, I want to redirect username.github.io to username.com.
As of now, if somebody enters username.github.io, it takes you to the 404 not found page.
Is there anyway I can reroute it to username.com?
Instead of a redirect, the normal process is for your current GitHub pages to use a custom domain
You find a better illustration of that process here
Go to your GitHub Pages site’s repository settings.
Under “Custom domain”, add or remove your custom domain and click “Save”.
Setting “custom domain” creates a file named CNAME in the same repository.
Don’t delete it.
The OP sidv adds in the comments:
After setting up my website (deployed elsewhere) and the DNS servers, I was unable to open the webpage on Safari and Firefox (only on Chrome).
Finding the load balancing IP and configuring it as an A record ended up redirecting the webpage appropriately.

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.

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

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

Github Top-Level Project Page

Is it possible to publish a project page to http://username.github.com/ instead of http://username.github.com/projectname?
Create a repository called username.github.com and it will automatically be used as your top-level page.
Note that since April 2013 ("New GitHub Pages domain: github.io"):
User Pages repositories may now be named using the new username/username.github.io
Existing User Pages repositories named like username/username.github.com do not need to be renamed and will continue to be published indefinitely.
If both a username.github.io and a username.github.com repository exists, the username.github.io version wins.
So the solution is still valid, but be aware that:
If your Pages site was previously served from a username.github.com domain, all traffic will be redirected to the new username.github.io location indefinitely, so you won't have to change any links.
For example, newmerator.github.com now redirects to newmerator.github.io.