Github Pages is so amazing. It can let you build your own website for free. Can be your a project or blog, or your company’s website. This article thinks you’ve created your own website on Github Pages. If not, please going to Github Pages create one first. The following steps will tell you how to connection Github Pages to your own domain on GoDaddy.

  1. 1. First you need create custom domain on your repository at Github.

    Here can found the settings option on your repository Repository's Settings Option

    Then scroll to down found the ‘Custom Domain’ option and set as your own(e.g. my domain is Set your custom domain

  2. 2. Second you need create new file at your repository root folder. The file name must be ‘CNAME’, all caps and no suffix. And the content is your own domain. Here is my CNAME file’s content:CNAME File

  3. 3. At last. Go to GoDaddy and found the DNS settings page. You need set two value, change or create new value both are ok. One is A-> two IP are Github Pages addresses,just choose one). The other is CNAME-> Here is my: GoDaddy IP Address GoDaddy CNAME

    If you are not using GoDaddy. Please going to found your domain’s DNS settings page, and set the same values as above, I think also can success.

When you done all of these steps, then your own domain will connection to your Github Pages. But the DNS set done need times and you need wait. At the same time, you can use the following code to test it is success or not.

dig youdomain +nostats +nocomments +nocmd

When the IP address is your choice one of Github Pages( means success and you can browse your website use your own domain for now. Congratulations! You are successfully.