Google admin console use with github hosted website

468 views Asked by At

I have purchased a domain through the google admin site (G suite), and I am trying to use it in conjunction with a page hosted on github. In google admin I have added a domain alias that is the url pointing to the github page I have hosted. And through github under the 'Github Pages' section of settings I have changed the custom domain to point to the purchased domain I have. But for some reason the webpage I have in my github repository is not displaying on the domain I have purchased. Instead when I navigate to the domain I have purchased, nothing displays, and when I go to the github url of my hosted page it reroutes me to my purchased url.

Am I doing something wrong?

2

There are 2 answers

0
therobinkim On BEST ANSWER

Here's how I set up http://jsonp.therobinkim.com/ to point to https://therobinkim.github.io/lets-learn-jsonp.

On GitHub, from https://github.com/therobnkim/lets-learn-jsonp settings, I put jsonp.therobinkim.com under my GitHub Pages Custom domain settings.

On Google Domains, from my custom domain's DNS settings, I added a new Custom resource record:

  • jsonp, my custom subdomain (changed from default @)
  • CNAME, bc we're pointing to another website by name instead of IP address (changed from default A)
  • 1m (changed from default 1h, but not necessary)
  • therobinkim.github.io (changed from placeholder IPv4 address)

It started working for me within 5 minutes.

I hope this helps!

3
wanderer0810 On

You need to create a cname file on your github repository. It is as simple as creating a file called CNAME, then putting your domain on it, i.e. yourdomain.com