Notes on Configuring Both Apex and www Subdomain for GitHub Pages

Hi, I'm Hwee-Boon Yar

I write, ship and sell software products. iOS/OS X app developer based in Singapore, working remotely. This is my blog.


Need to run a code review on your codebase? Hire me

This is about configuring both apex and www subdomain for GitHub Pages.

  1. Configure GitHub Pages in the repository settings as described
  2. Set the custom domain as the apex domain, e.g.
  3. In DNS provider, add CNAME record for www -> <usernamme> (yes, just the domain name; it doesn't include the repo name)
  4. In DNS provider, add ANAME record for -> <usernamme>
  5. Set low TTL for testing
  6. Verify curl returns content correctly
  7. Verify curl shows a redirect
  8. Set a higher TTL

Like this post? Follow me @hboon on Twitter.