Point a domain at GitHub Pages

Updated 2026-08-23

The exact records for apex and www, why you need both, and how to verify the domain to stop takeovers. Ten minutes, four A records, one CNAME.

The records

GitHub Pages publishes four anycast IPs for apex domains. In your DNS provider, create these records:

  • A @ → 185.199.108.153
  • A @ → 185.199.109.153
  • A @ → 185.199.110.153
  • A @ → 185.199.111.153
  • CNAME www → <your-username>.github.io

Then tell GitHub about it

In the repository: Settings → Pages → Custom domain, enter your apex domain and save. GitHub writes a CNAME file into the site and provisions a certificate; “Enforce HTTPS” becomes available once the certificate is issued, which can take a few minutes to an hour after DNS propagates.

Also verify the domain at the account level (Settings → Pages → Verified domains). Verification pins the domain to your account so nobody else can claim it on GitHub Pages if your DNS ever dangles — a real class of takeover, cheaply prevented.

Checking your work

dig A yourdomain.com +short should return the four 185.199.x.153 addresses; dig www.yourdomain.com +short should show the github.io hostname. If you registered through SpargoDomains, the domain’s journey card flips to Pointed when public DNS answers and Alive when the site responds over HTTPS — the same checks, watched for you.

Check any domain’s provider concentration in ten seconds — free, no signup.

Run the DNS checker