Setting Up a Custom Domain Using Namecheap && Github

As you may or may not know, when you create a github account, you also get one site for your user/organization, and unlimited repository pages. Its as simple as adding an index.html to the master branch of each repository and allowing it to use Github Pages (Settings>GitHub Pages>Source>Master>Save).

For this example I will use my current domain, avarghese.me

Github Config:

Settings>Custom Domain>avarghese.me>Save github config

Namecheap Config:

Dashboard>avarghese.me>Manage>Advanced DNS
A record, host=@ value=192.30.252.153
A record, host=@ value=192.30.252.153
CNAME record, host=www value=avarghese4790.github.io
namecheap config
The following can help debug to see if the configurations are done correctly. Both calls from the domain and your repository url should have the same A record IP.

Command:
dig avarghese.me +nostats +nocomments +nocmd
Output:

; <<>> DiG 9.8.3-P1 <<>> avarghese.me +nostats +nocomments +nocmd
;; global options: +cmd
;avarghese.me.			IN	A
avarghese.me.		1458	IN	A	192.30.252.154
avarghese.me.		1458	IN	A	192.30.252.153

Command:
dig avarghese4790.github.io +nostats +nocomments +nocmd

Ouput:

; <<>> DiG 9.8.3-P1 <<>> avarghese4790.github.io +nostats +nocomments +nocmd
;; global options: +cmd
;avarghese4790.github.io.	IN	A
avarghese4790.github.io. 3574	IN	CNAME	github.map.fastly.net.
github.map.fastly.net.	2040	IN	CNAME	prod.github.map.fastlylb.net.
prod.github.map.fastlylb.net. 12 IN	A	151.101.44.133

My Pages

Organization: arvarghese
Landing page: arvarghese/arvarghese.github.io = avarghese.me
Resume page: arvarghese/resume = avarghese.me/resume
Travel page: arvarghese/travel = avarghese.me/travel
This Blog: arvarghese/blog = avarghese.me/blog

resume site landing page site travel site blog site

Reference: