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