Opens in a new tab

Connect a domain to GitHub Pages: the DNS records

Point the root domain at GitHub’s four addresses — with the four IPv6 ones if you like — and www at your github.io name. Then add the domain in the repository’s Pages settings and wait for GitHub’s Let’s Encrypt certificate. Verify the domain too: it stops anyone else’s repository from taking it over.

The records to add

NameTypeValue
@A185.199.108.153
@A185.199.109.153
@A185.199.110.153
@A185.199.111.153
@AAAA2606:50c0:8000::153
@AAAA2606:50c0:8001::153
@AAAA2606:50c0:8002::153
@AAAA2606:50c0:8003::153
wwwCNAMEUSERNAME.github.io

The AAAA records are optional; if you add them, keep the A records too. Point www at your user or organisation name on github.io — never at the repository name or the site’s *.pages.github.io address. Instead of the A records, an ALIAS or ANAME to USERNAME.github.io also works.

VerificationTXT at _github-pages-challenge-USERNAME, from the account’s Pages settings
CertificateLet’s Encrypt, usually within an hour

Check your domain

Enter your domain: we look up its records and compare them with what GitHub Pages expects — the root, www, and any record left over from before.

Step by step

  1. In the repository, open Settings → Pages and enter the custom domain; GitHub commits a CNAME file.
  2. At your DNS host, add the four A records (and the AAAA records if you want IPv6) for the root, and a CNAME for www to USERNAME.github.io.
  3. Verify the domain in your account’s (or organisation’s) Pages settings with the TXT record GitHub gives you.
  4. When the certificate is ready, tick Enforce HTTPS.

What to remove

  • Any default record your DNS host set for the root — a parking page, forwarding.
  • Any other A, AAAA, ALIAS or ANAME records on the root: GitHub says they can stop the certificate being issued.

The certificate

GitHub gets a Let’s Encrypt certificate once the records resolve — usually within an hour; Enforce HTTPS can take up to 24 hours to become available. If the domain has CAA records, one must allow letsencrypt.org.

Common mistakes

  • A wildcard DNS record (*.example.com) pointing at GitHub: GitHub warns it puts the domain at immediate risk of takeover, even when verified.
  • Leaving the custom domain set on a disabled or deleted site — another user can then claim it.
  • Pointing www at the repository name, or at the site’s pages.github.io address.
  • After changing DNS, the Pages settings may need the domain removed and added again.

Sources

Records checked on 26 September 2026 against these official sources:

Know the moment your site stops answering

Add your site and we check it every few minutes, confirm a failure from another location — Europe, North America or Asia — before calling it down, and email you when it stops answering and when it is back. Free for two sites.

Create a free account