Setting Up a Custom Domain With Octopress / Github Pages

Flatiron School / 30 July 2013

The following is a guest post by Chris Gonzales and originally appeared on his blog. Chris is currently a student at The Flatiron School. You can follow him on Twitter here.

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

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

  1. Buy your domain name. I picked mine up from Namecheap so I’ll use screenshots of my setup on their site.
  2. Next, set up an A Record of and CNAME of your github pages address, in this case This can be done from “All Host Records” on Namecheap.
  3.  Finally, create a file called CNAME in 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 generate it 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, you’ll be directed to github at, 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.

Previous Post Day 5: Making My Params First Next Post