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

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.

Related

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.

Custom domain for github project pages

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

How to Setup Github Pages for account?

I am trying to figure out how to setup github pages for account rather than for a repository.
E.g
I want the blog address to be like this:
xxx.github.io rather than xxx.github.io/repo. Therefore when i go to xxx.github.iothe static markdown pages should appear rather than a 404 page.
Thanks.
You're looking for Pages' user / organization sites. The official site has a good getting started guide, but the first bit is the most important one:
Create a repository
Head over to GitHub and create a new repository named username.github.io, where username is your username (or organization name) on GitHub.
If the first part of the repository doesn’t exactly match your username, it won’t work, so make sure to get it right.
So, instead of creating a gh-pages branch as you would for a project site, you must create a repository that matches your user name.

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.