Blank webpage when using GitHub pages with custom Google domain - dns

I'm trying to switch my domain name from seanhetzel.github.io/seanhetzel to seanhetzel.com. I set up the custom domain in the GitHub pages settings, and it now has a CNAME containing seanhetzel.com. I also set up the DNS records with Google. Its been well over 48 hours and all that loads are a blank and page 404 errors. The site worked with seanhetzel.github.io and I'm using HashRouter. Is there something I'm missing?
Thanks!

I forgot to change my homepage in package.json.
Changing:
"homepage": "https://seanhetzel.github.io/sean-hetzel"
to
"homepage": "https://seanhetzel.com"
in package.json fixed the blank page because now it is loading the actual homepage.

GitHub pages suggests to create a new repository named username.github.io, where username is your username (or organization name) on GitHub.
But I only see https://github.com/Seanhetzel/sean-hetzel, not https://github.com/Seanhetzel/Seanhetzel.
Naming the repository appropriately might be the missing piece.
The OP Sean Hetzel adds in the comments:
I changed the name of the repository to Seanhetzel with a capital S but realized that google domains didn't allow for caps in their CNAME record and changed Seanhetzel.github.io to seanhetzel.github.io.
So I changed my GitHub username and repository name to sean-hetzel and updated the google domain to reflect this.

Related

Custom subdomain with project page hosted on Github pages

I have already successfully set up a GoDaddy subdomain to point to my personal gh-pages website. This means that my username.github.io webpage is pointing to subdomain.domain.com.
As a consequence of this, all the project gh-pages on my github account are changed accordingly, e.g. a page on repository test-project (which would have been previously hosted at username.github.io/test-project) now is hosted at subdomain.domain.com/test-project.
I would now like to set up my GoDaddy DNS manager in such a way that my test-project gh-page points to a second subdomain, for example project.domain.com.
Now, I know there are plenty of similar questions on stackoverflow, but none of them seems to be solving my specific case. My problem is that I don't know what to add to the CNAME record on GoDaddy. I've tried with both subdomain.domain.com/test-project and username.github.io/test-project , but none of them seems to be working! In particular, if I put username.github.io/test-project, it returns the following error:
Enter either # or a valid host name such as: "subdomain.domain.tld"
UPDATE
I've solved by following this Subdomain of website for Github pages project and having my subdomain CNAME to point to username.github.io. (notice the . at the end). I will do it for any other future subdomain.
Now my question becomes: what does the . do? What does it mean? It is not very clear to me.
The trailing dot at the end is as per RFC defined for fully qualified domain name.
So actually every domain ends with a trailing dot internally. You can actually check this for any website just add a trailing dot in the domain name you will still get the same page. eg.
https://stackoverflow.com./questions/53450113/custom-subdomain-with-project-page-hosted-on-github-pages
So when you make a dns request for domain.com, the browsers stub resolver actually makes a DNS query for domain.com. to the DNS server.
Hop this helps/

Gitlab pages: verify domain ownership

This might look like a duplicate but i can't seem to find the answer to this question on other similar threads.
I've been trying to verify my custom domain on gitlab pages but it keeps giving the 'failed to verify domain ownership' error. My DNS settings are set like this. On gitlab i've added the domain in the settings/pages tab.
When going to the domain now, it only shows a gitlab 404, which is the exact same as just entering '52.167.214.135' in the address bar. I've waited a few days for the verification.
What am i doing wrong, and how can i fix it?
(Note: The TTL of 1min is only temporary for testing purposes)
The Gitlab documentation for setting a personal domain is wrong. If you want to set to your page the www.foo.bar subdomain Gitlab give you this entries to add in your DNS file.
www.foo.bar CNAME free_zed.gitlab.io.
_gitlab-pages-verification-code.www.foo.bar TXT gitlab-pages-verification-code=776615a3e132b0f5a6638c7e26e59084
This cannot work, you had to use these entries instead : 
www CNAME free_zed.gitlab.io.
_gitlab-pages-verification-code.www TXT gitlab-pages-verification-code=776615a3e132b0f5a6638c7e26e59084
See Gitlab pages issue

Github pages with custom CNAME security

Github allows you to host static pages on your own domain name. The procedure is described here: https://help.github.com/articles/setting-up-a-custom-domain-with-pages
It mentions that you have to create a file called CNAME in your repository to make sure your domain is mapped to this repository.
What would happen if someone else would create a pages repository with your domain name in their CNAME file? Would they be able to hijack your domain this way, or will Github forever associate this domain name with your repository?
First of all, if you take the CNAME first, you're safe. GitHub Pages will raise an error to anyone who would try to create the same CNAME file. This if a bit frustrating with forking such repository.
On the second hand GH Pages recently added an option to set DNS to a specific account, using CNAME DNS record instead of A like this:
www.example.com CNAME username.github.io
Checkout the page you mentioned for more info: https://help.github.com/articles/setting-up-a-custom-domain-with-pages
Currently accepted answer is partially wrong.
Yes, you are safe as long as you claim domain name first and as long as it is set up in you repository.
But linking CNAME to specific account just does not do anything. It could work in past, but now it is simply broken. Even if you set up CNAME with your account name, anyone can still use your domain if you did not set it up in your repository. You can check my detailed post about this problem here.

Not able to set my domain name

I am trying to map my site which is on github pages (tusharmath.github.io) to a particular domain (tusharm.com) using cloudflare name servers.
Its been more than a day and i can still not see view my website on tusharm.com
Steps followed -
Added a CNAME file with value tusharm.com in the gh-pages branch on github.
Updated name servers on CrazyDomain that were provided by CloudFlare.
tusharm.com is loading the same content as tusharmath.github.io at this time, which would lead me to believe you were able to fix things here. Did you need to make any further changes to get this working?
p.s. I work for CloudFlare.

How can I stop a github project page (or other subpage) from showing custom domain name?

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
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

Resources