Using a custom domain with GitHub Pages

It took far too long to work out how to do this on the GitHub help pages...



  1. Enable custom domain in your repository (settings).
  2. Update your A record to point to IP addresses: and Pro-tip: Switch your DNS management to cloudflare if you want super fast switch from your old hosting to GitHub.
  3. echo "your-domain-name" > CNAME in the default branch repo. This will be source if you're doing this for a Cobalt site.