In this tutorial, we’ll cover how to link a github page to a GoDaddy domain.
- Create github repo with your static page in gh-pages branch
- Add 18.104.22.168 and 22.214.171.124 A records in GoDaddy
- Add CNAME record with
.github.io for host **www**
- Add CNAME file with your domain name in github repo
Let’s start with creating a GitHub static page. You can easily do it with a tool like gh-deploy or go through the steps manually. For the manual description, please refer to Creating Project Pages manually. You can also do it using GitHub’s page generator, which sets up your page with Jekyll.
The configuration for proper domain resolution, consists of the following steps:
Once logged into GoDaddy, go to your domain ‘Manage domain’ control panel. Here you need to configure two things. The first thing is adding the A record, which basically points a domain to an IP address. Here’s what it should look like once you’re done:
In case the GitHub’s IP addresses change, check here for reference.
The next thing is to add the CNAME record which ties the domain to your github account:
Last thing to do, is to add a CNAME file in the root of your GitHub repo, that tells GitHub that THIS repo should be served, if the URL requested is http://xyz.com
After those steps, depending on TTL (time to live) and DNS propagation, it may take some time for the page to be available at the new URL.