Hosting a Static Site on GitHub Pages with a Custom Domain
GitHub Pages is a free static hosting service built into every GitHub repository. Combined with a custom domain and a handful of DNS records, you can serve a production site with HTTPS for nothing beyond the cost of the domain name.
This note covers the full path: repo setup, Pages configuration, DNS records, and TLS enforcement.
Prerequisites # A GitHub account and a repository containing your static site output (HTML/CSS/JS) A registered domain name managed at any DNS registrar (examples use Porkbun) gh CLI installed and authenticated (gh auth login) 1. Prepare the repository # Your repo needs to end up with built HTML at a known location. Two options:
