Clicky

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. example.com
  3. In DNS provider, add CNAME record for www -> <usernamme>.github.io (yes, just the domain name; it doesn't include the repo name)
  4. In DNS provider, add ANAME record for example.com -> <usernamme>.github.io
  5. Set low TTL for testing
  6. Verify curl https://example.com returns content correctly
  7. Verify curl https://example.com shows a redirect
  8. Set a higher TTL

Like this post? Follow me @hboon on Twitter.