Custom Domains for GitHub Pages

GitHub Documentation on Setting up Custom Domains will not that great if you do not know what you are supposed to do.

Here’s what you need to do to setup your own Subdomain.

Create a CNAME file on your repo root. Then push your code to GitHub.

Add a CNAME record in your DNS Provider pointing to your GitHub domain. I am using GoDaddy for DNS.

I did not find a way to enable HTTPS from within GitHub. There was an article on using a CDN to enforce HTTPS to your site.

If you have an NGINX in the Public Domain adding configuration like below to the conf files will route traffic from https://pubudu.kubefire.com to https://welagedara.github.io where your GitHub Pages are.

You may also like

Leave a Reply

Your email address will not be published. Required fields are marked *