Congrats, so you’ve finally created a personal website using github pages and now want a custom domain with it?
Fear not it won’t take much time. Just follow the few basic steps.
Note: This post will be later merged or referred to the Making a Blog with Github in 1 hour tutorial.
So, let’ get started:
1. Buy a domain on GoDaddy.
2. Go to your GitHub pages repository and click on the settings icon located in the upper righthand corner.
3. In the setting’s page, scroll down and then add and save your custom domain in the field provided (www.yourwebsitename.com)
4. Check your root folder <github-username>.github.io/. There should be a CNAME File created with the url. If not create a CNAME File (Filename: CNAME no extensions) and add your url to it. Commit the changes.
5. Go to your GoDaddy account and click on the Domains tab. Manage DNS dropdown menu.
6. Within the DNS management page you will need to make three changes:
+ In the Type “A” row update the IP address to: 22.214.171.124
(this will point your custom domain to GitHub’s server)
+ In the CNAME row with Name “www” input your gh-pages website (username.github.io)
+ At the bottom click the “ADD” button and make another Type “A” row with a different IP address of: 126.96.36.199
(don’t worry when you leave the page it will alphabetize the types)
7. Save the new DNS settings.
8. DNS Changes takes a few minutes of time after that your site should be available in www.yourwebsitename.com
I hope it helps.