Post

Github Pages Custom Domain


GitHub Pages is a web hosting service provided by GitHub for hosting static websites directly from a GitHub repository.
GitHub Pages Custom Domain allows us to use our own domain (e.g., helenaferdy.site) instead of the default GitHub Pages URL (e.g., helenaferdy.github.io).



Configuring Custom Domain

First buy the domain the we’d like to use, here we buy a cheap domain of helenaferdy.site for Rp. 14.900 (USD. 1$)

x


After completing payments and filling up some forms, the domain is up and active

x


Next following the Github Docs Regarding Custom Domain, we have to configure the apex domain and www subdomain on the domain’s DNS configuration

x

x


First we configure the A and AAAA records

x

A (ipv4) and AAAA (ipv6) records are types of DNS records used to map domain names to IP addresses


After that we configure the CNAME record

x

A CNAME (Canonical Name) record is DNS record used to create an alias or redirection from one domain name to another


Doing a dig command confirms that the custom domain points to the configured IP Addresses

x


Now go to the Github Repository » Settings » Pages, enter the custom domain

x


After the DNS check, github will also take care of the certificate stuff to enable HTTPS

x


After a while, now on Github Repository it shows that the site is hosted on the custom domain

x


And accessing helenaferdy.site shows that the custom domain is now up and accessible

x


Bonus, if we do a whois lookup, it shows the registration status of the domain

x


This post is licensed under CC BY 4.0 by the author.