Blog

Configuring github page with a custom domain

Thu Aug 01 2019

Namecheap
Github
Infra
Leaves

So let’s say we have the live site at xyz.github.io, and we also have a custom domain that we want to use at Namecheap.

  • First we will need to go to the settings of our repository and find the github pages section.
  • Add the new custom domain name like:
xyz.dev

You can add a domain with any TLD. “.dev” is only served trough https.

  • Go to your Namecheap dashboard, select the domain and go to advanced DNS settings.
  • Add the following records:
These are for Github pages:
A Record            @       185.199.108.153             Automatic
A Record            @       185.199.109.153             Automatic
A Record            @       185.199.110.153             Automatic
A Record            @       185.199.111.153             Automatic

This is how you set up a subdomain (magic.xyz.dev):
CNAME Record        magic   xyz.github.io               Automatic

That’s it. Not even namecheap’s blog got it right.