resellerhq

GitHub Pages DNS record generator

Get the four fixed apex A records, the optional IPv6 set and the www CNAME GitHub Pages needs, with your own user or organisation name built in.

None of the records below change with this — it only lets the page name your own domain instead of speaking generically.

Just the name, not a full github.io address — it is used to build the www CNAME target below.

Also add IPv6 (AAAA) records

Result

A records ready — add your GitHub name for www

Add the four A records at the root of your domain, and the www CNAME below once your GitHub name is filled in.

  • Info

    The records below do not need your domain

    The four apex A records are the same for every GitHub Pages site, so typing your domain only makes this page name it instead of speaking generically.

  • Info

    Add your GitHub user or organisation name for the www record

    The www CNAME points at your own "<name>.github.io", which is the one value here that is not fixed — so it is left out below rather than shown as a pattern you could paste by mistake. Type the name above and the finished record appears.

  • Info

    Whether the repository needs its own CNAME file depends on how it publishes

    Configuring a custom domain in the repository's Pages settings creates a commit that adds a CNAME file to the root of the source branch automatically. A site published through a custom GitHub Actions workflow never gets that commit, and GitHub neither requires nor reads an existing CNAME file there — so a mismatch only matters for a branch-published site.

    Check whether this repository publishes from a branch or from a custom Actions workflow before treating its CNAME file as something to fix.

  • Passed

    Four apex A records, ready to paste exactly as shown

    These four addresses are the same for every GitHub Pages site using a custom domain, with nothing per-repository to substitute.

Apex A records to publish

185.199.108.153 185.199.109.153 185.199.110.153 185.199.111.153

At @ (A)

All four go at the root of the domain (shown as "@" in most panels), not a subdomain.

DNS records for your domain

HostTypeValuePriority
@A185.199.108.153—
@A185.199.109.153—
@A185.199.110.153—
@A185.199.111.153—
wwwCNAME(add your GitHub name above)—

Tick "Also add IPv6" above to list the optional AAAA set alongside these.

  • This cannot see whether the repository's own CNAME file matches what DNS actually points to — a mismatch there is a GitHub-side setting this tool never sees, and (per the finding above) it only matters for a site published from a branch, not one published through a custom Actions workflow.

What this is

This GitHub Pages custom domain DNS generator writes out the four fixed apex A records, the optional IPv6 addresses and the www CNAME GitHub documents for every Pages site, built from your own GitHub user or organisation name rather than left as a pattern to fill in by hand.

A GitHub Pages site on a custom domain needs the apex pointed at four fixed IP addresses — the same four for every repository on the planet — and, for the "www" address to also work, a CNAME there pointing at the owning account or organisation's own "name.github.io".

GitHub's own documentation page also lists four IPv6 addresses for the same apex, as an optional addition for a panel that supports AAAA records. They are fixed the same way the four A records are, and this generator adds all four the moment you ask for them.

How to read the result

A pass finding below means a value is final and ready to paste; an info finding names something this page is waiting on, almost always your GitHub user or organisation name for the www target.

The four A records never change no matter what is typed above — only the www CNAME target depends on the second field, and the AAAA records only appear once you tick the IPv6 switch.

Common mistakes

  • Copying a www CNAME target out of somebody else's guide — Every guide writes that target as a bracketed pattern, and published as written it points "www" at a hostname that does not exist. It is the one value on this page GitHub does not fix for everybody: it is built from whichever account or organisation owns the repository, which is why nothing is offered to copy here until that name is typed in.
  • Assuming the repository's own CNAME file always has to match DNS — That is only true for a site published from a branch, where GitHub commits a CNAME file to the repository automatically. A site published through a custom GitHub Actions workflow never gets that file, and GitHub does not read or require one there.
  • Leaving out the AAAA records because the A records alone seem to work — A GitHub Pages site resolves fine over IPv4 with only the A records published, but GitHub documents the four AAAA addresses as part of the same fixed set for panels that support them, not as an optional extra for later.

Questions

Why are there four A records instead of one?

GitHub Pages serves every custom domain from four separate IP addresses rather than one, for redundancy at the root — all four are published together, and a DNS panel that only accepts one A record at a time needs all four entries added, not a single pick from the list.

What goes in the www CNAME if I only use the bare domain?

Even a site that is only ever linked to as the bare domain benefits from the www CNAME, because people routinely type "www" in front of any address out of habit — it points at the owning account or organisation's own "name.github.io", so visitors land on the same site either way.

Do I need the IPv6 (AAAA) records as well as the A records?

They are optional — add them only if your DNS panel supports AAAA records at all. GitHub documents the four addresses alongside the A records as part of the same fixed set, not as a separate or newer configuration.

Does my repository's own CNAME file need to match these DNS records?

Only if the site publishes from a branch, where GitHub commits that file into the repository automatically when a custom domain is configured. A site published through a custom GitHub Actions workflow never gets that commit, and GitHub neither reads nor requires an existing CNAME file there.

Sources

Every fixed value this page gives you comes from the provider’s own documentation. These pages change, so each one says the day it was last read here.

Resell the domains these records point at, at your own price, under your own brand.

Get started

API example

Example request
curl -X POST https://163-123-236-68.sslip.io/api/tools/github-pages-dns-generator \
  -H "Content-Type: application/json" \
  -d '{"domain":"","username":"","ipv6":false}'
Example response
{
  "tool": "github-pages-dns-generator",
  "input": {
    "domain": "",
    "username": "",
    "ipv6": false
  },
  "result": {
    "verdict": {
      "tone": "success",
      "headline": "A records ready — add your GitHub name for www",
      "summary": "Add the four A records at the root of your domain, and the www CNAME below once your GitHub name is filled in."
    },
    "findings": [
      {
        "id": "domain-not-needed",
        "severity": "info",
        "title": "The records below do not need your domain",
        "detail": "The four apex A records are the same for every GitHub Pages site, so typing your domain only makes this page name it instead of speaking generically."
      },
      {
        "id": "add-username-for-www",
        "severity": "info",
        "title": "Add your GitHub user or organisation name for the www record",
        "detail": "The www CNAME points at your own \"<name>.github.io\", which is the one value here that is not fixed — so it is left out below rather than shown as a pattern you could paste by mistake. Type the name above and the finished record appears."
      },
      {
        "id": "repository-cname-depends-on-publishing-method",
        "severity": "info",
        "title": "Whether the repository needs its own CNAME file depends on how it publishes",
        "detail": "Configuring a custom domain in the repository's Pages settings creates a commit that adds a CNAME file to the root of the source branch automatically. A site published through a custom GitHub Actions workflow never gets that commit, and GitHub neither requires nor reads an existing CNAME file there — so a mismatch only matters for a branch-published site.",
        "fix": "Check whether this repository publishes from a branch or from a custom Actions workflow before treating its CNAME file as something to fix."
      },
      {
        "id": "apex-a-records-ready",
        "severity": "pass",
        "title": "Four apex A records, ready to paste exactly as shown",
        "detail": "These four addresses are the same for every GitHub Pages site using a custom domain, with nothing per-repository to substitute."
      }
    ],
    "parts": [
      {
        "kind": "record",
        "title": "Apex A records to publish",
        "value": "185.199.108.153\n185.199.109.153\n185.199.110.153\n185.199.111.153",
        "note": "All four go at the root of the domain (shown as \"@\" in most panels), not a subdomain.",
        "at": {
          "name": "@",
          "type": "A"
        }
      },
      {
        "kind": "table",
        "title": "DNS records for your domain",
        "columns": [
          "Host",
          "Type",
          "Value",
          "Priority"
        ],
        "mono": [
          2
        ],
        "rows": [
          [
            "@",
            "A",
            "185.199.108.153",
            "—"
          ],
          [
            "@",
            "A",
            "185.199.109.153",
            "—"
          ],
          [
            "@",
            "A",
            "185.199.110.153",
            "—"
          ],
          [
            "@",
            "A",
            "185.199.111.153",
            "—"
          ],
          [
            "www",
            "CNAME",
            "(add your GitHub name above)",
            "—"
          ]
        ],
        "note": "Tick \"Also add IPv6\" above to list the optional AAAA set alongside these."
      }
    ],
    "limits": [
      "This cannot see whether the repository's own CNAME file matches what DNS actually points to — a mismatch there is a GitHub-side setting this tool never sees, and (per the finding above) it only matters for a site published from a branch, not one published through a custom Actions workflow."
    ]
  }
}

Related tools

DNS

Netlify DNS record generator

Get Netlify's apex record — ALIAS, ANAME or the fallback A — plus a www CNAME completed with your own Netlify subdomain.

DNS

DNS lookup

Query any DNS record type from two resolvers at once, so a change still spreading is easy to spot.

DNS

Shopify DNS record generator

Get the apex A record, the AAAA record and the www CNAME Shopify asks for, with its own one-record-only rule flagged before you publish.

DNS

TXT record splitter

Split a long TXT record value into properly quoted 255-byte character-strings, or the one value a panel that auto-joins would want.