Evan Sosenko

GitHub Pages on an apex domain with CloudFlare

by Evan Sosenko

12 Aug 2014

Even after carefully reading the GitHub Pages docs, it took me a while to figure out a CloudFlare DNS configuration with everything working how I wanted.

This guide makes the following assumptions:

  1. Add a CNAME file with io.example.com to the username/username.github.io repository. Optionally, redirect io.example.com to example.com using JavaScript (see razor-x.github.io/index.html) or a CloudFlare page rule.

  2. Add a CNAME file with example.com to the username/example.com repository.

  3. Setup CloudFlare with these DNS records:

Type Name Value CloudFlare Active
A example.com 192.30.252.153 true
A example.com 192.30.252.154 true
CNAME io username.github.io true
CNAME www example.com true
Professional
razorx {at} evansosenko.com
Academic
evan.sosenko {at} email.ucr.edu
×