Skip to content

Managing a custom domain for your GitHub Pages site — by GitHub Docs

beginnerpageLink only (©)

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

  1. Settings > Pages: enter the custom domain and Save
  2. Create the apex A/AAAA or ALIAS/ANAME records, and a www CNAME to USERNAME.github.io
  3. Verify with dig
  4. Enable Enforce HTTPS once DNS propagates

Paraphrased from the source. Menus can differ by version, so check the original for full details.

Read the full article on docs.github.com

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

github pagescustom domaindns

More in Hosting & Deploying