Wondering how to set up and use GitHub pages custom domain name? This tutorial will take you through the configuration steps. By the time you are done with reading, you will be able to configure your custom domain name DNS for use on Github pages username.
What is GitHub pages?
GitHub Pages is a service provider that allows anyone to set up a website for his or her project, or for an organization. In addition, Github pages allow users to host their created websites directly in the GitHub Pages repository.
If you are looking for a reliable, and better services provider with exceptional features including use of custom domain name, custom email addresses, custom 404 error pages, multiple additional pages, etc, Github pages matches your need.
Why use a custom domain name on Github pages?
- Getting rid of a sub domain for example username.github.io
- Use of custom email address
- Branding your website
When I wrote this post about how to add a custom domain to blogger GoDaddy, many of my readers requested me to share a post about how one can use a custom domain name on GitHub pages hosted website. It is for the above that I am sharing this out so that anyone who might be searching for the same can take advantage of this guide.
Instructions to configure a custom domain for Github pages
Getting started with the above service provider means visiting their website and choosing either to use an organization or project page which comes in form of example.github.io and once you are done with the above, the next step is configuring your DNS.
How To Set Up Your Domain DNS
Setting the above is simply provided you have a domain name. You can visit your trusted domain name provider or even take up a free domain name or use a coupon code, buy your preferred domain name and make sure that it’s up. With your domain name in place, you will need to configure your C Name and A records just like you see below.
C Name Setup
Log in to your domain manager, go to DNS under manage domain in most cases, and from the drop-down menu under choose records, select C Name. Enter your GitHub pages sub-domain for example username1.github.io and move to choose the next record.
A Record Set Up
Just like in the C Name above, choose A record this time and enter 220.127.116.11, create another A Record and enter 18.104.22.168.
Save settings and wait for your domain DNS to propagate. The time may differ ranging from provider to provider and may not go beyond 48 hours in most cases. Once the propagation is done, your custom domain name will be attached and showing on your GitHub pages subdomain.