转自: http://andrewsturges.com/blog/jekyll/tutorial/2014/11/06/github-and-godaddy.html
I own a custom domain through GoDaddy.com that I want to use for my user page at arsturges.github.io.
Github.io offers a neat, free hosting option. I had no trouble setting up a site at arsturges.github.io, but I found the custom URL documentation to be unclear. Below, I'll explain how I set up my github.io user page with my GoDaddy.com domain name andrewsturges.com.
In brief, the steps are as follows:
- Set up my user page arsturges.github.io
- Commit a file called CNAME with one line:
andrewsturges.com
- Go to GoDaddy site to manage my URL
- Add an "A (Host)" record with "host" =
@
and "Points to" =192.30.252.153
- Add a "CNAME (Alias)" record with "host" =
www
and "Points to" =arsturges.github.io
- Wait for changes to propogate.
When the DNS updates, you should be able to navigate to your custom domain and see your pages.github.io page. You can check your work with the following command, and compare to my results: