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:
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 @ 126.96.36.199 Automatic A Record @ 188.8.131.52 Automatic A Record @ 184.108.40.206 Automatic A Record @ 220.127.116.11 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.