Managing a custom domain for your GitHub Pages site — by GitHub Docs
Explains adding the domain in repository settings and creating DNS records: four A (and optional AAAA) records or ALIAS/ANAME for the apex, CNAME for www. Warns against wildcard DNS records because of takeover risk.
Quick steps
- Settings > Pages: enter the custom domain and Save
- Create the apex A/AAAA or ALIAS/ANAME records, and a www CNAME to USERNAME.github.io
- Verify with dig
- Enable Enforce HTTPS once DNS propagates
Paraphrased from the source. Menus can differ by version, so check the original for full details.
Source: Managing a custom domain for your GitHub Pages site by GitHub Docs. Licence: Link only (©).
- Source reviewed
- 2026-11-02
- Link checked
- 2026-11-02
- Tested hands-on
- Not by Oddbyte.Me