I set up a blog with Octopress. It’s great, but I’d always get really skeptical looks when I’d tell friends and family to read my stuff at chrisgonzgonz.github.io.
To remedy this, I bought a domain name. I had some issues getting it to play nice with my github pages site, so here’s a quick n’ dirty guide to setting this up:
Please note that this assumes that you’ve setup an Octopress blog
- Buy your domain name. I picked mine up from Namecheap so I’ll use screenshots of my setup on their site.
- Next, set up an A Record of
188.8.131.52and CNAME of your github pages address, in this case
chrisgonzgonz.github.io. This can be done from “All Host Records” on Namecheap.
- Finally, create a file called
CNAMEin your blog’s source folder. This part is important- if you’re not using Octopress you can put this in your blog’s root. Octopress requires that this file be in source so that when you
rake generateit can be pushed to master. In your CNAME file, save the name of your new domain:
That’s it, 3 easy steps.
Rake generate and
rake deploy as normal and it’ll take about 10 minutes to update. When you type in codercorral.com, you’ll be directed to github at 184.108.40.206, and my blog will be found via the CNAME file.
Also, Google has a cool guide to DNS basics for those interested in learning more about A Record and CNAME.
Make yourself useful.