Setting up a custom subdomain with GitHub User Pages and Namecheap
I finally found a succinct guide to setting up a custom Namecheap subdomain with GitHub pages.
My objective was to redirect my GitHub user page ellatronic.github.io
to my custom subdomain projects.ellatronic.com
. This process was actually alot easier than the hours it took me to figure it out, mostly due to the new format of the Namecheap dashboard and the old format shown in other guides I referenced.
Log in to Namecheap, go to Dashboard > Domain List.
Then click Manage on the domain you want.
Click Advanced DNS, then under Host Records click Add New Record.
Enter the following:
Type:
CNAME Record
Host: the subdomain name, for me this isprojects
Value: the GitHub pages URL, for me this isellatronic.github.io.
Namecheap will automatically add the last “.
” if you forget it.
TTL: AutomaticPress the green checkmark to save the record.
Next, go to the GitHub user page repo (
username.github.io
), for me it isellatronic.github.io
.Add a
CNAME
file containingsubdomain.domain.com
, so mine isprojects.ellatronic.com
.Make sure
CNAME
is in all capitals.Do not put
http://
before the subdomain.
Here's what the GitHub file looks like