Github pages is one of the simplest ways to blog, or to have a simple static site. However, routing your own domain to Github pages can be tricky. It is mostly a matter of correct configurations and patience. You need first to configure your domain or sub-domain to point to Github and then configure Github to recognize the routing. Finally, setting up HTTPS, which should work by just checking a single checkbox, but when it doesn’t, it is tough to know what to do next.

DNS configurations


In your domain providers’ DNS management page create new A Records. Set the value of the A record to @ and point it to the following IP addresses.


godaddy-github-domain.png Setting up an A record on GoDaddy


Setting up a sub-domain is rather easy. Just create a CNAME file in your repository root. The file should include your sub-domain, for example, In your domain providers’ DNS management page create a new CNAME record. The record should refer to in my case that was

godaddy-github-sub-domain-cname.png Setting up a CNAME record on GoDaddy

GitHub pages configurations


Under your repository settings, you will find a GitHub Pages section. All you need to do is to select what will be the source of the pages to serve. You can either select either master or gh-pages branches if they exist, or docs directory under your master branch.

Once you selected your page source, you have enabled your GitHub pages. The configuration section will show you the default URL which should be Now we get to the tricky part. enforcing https.

If you are using a sub-domain to route the traffic to, you should be able to select the checkbox and things should work like a charm. If not, check trouble-shooting https section.

Troubleshooting Https.

  • If you are routing a domain, you will need to make sure that you are using the four IPs in the domain section.
  • My website is over https, but the browser shows something is missed up with the certificate
    • Give it time, sometimes it could take up to a couple of hours before things work properly. The https certificate might still be pointing to instead of your domain.
  • When all has failed: Github responds to inquiries relatively quickly, within a day. Go to their contact us page.