GitHub Pages Dangling DNS & Takeover Fingerprint
A custom domain points via CNAME to a user.github.io host, but no GitHub repository currently claims this custom domain in its CNAME file. An attacker can create a public repo with a CNAME file claiming your domain.
DNS CNAME Delegation Rules
Authoritative Response Token
curl -sI https://subdomain.example.com | grep 'There isn\'t a GitHub Pages site here'When SubdomainWatch scanner identifies this response on an unresolved CNAME target, an automated alert is triggered within 800ms.
Remediation Guide & Defensive Action Plan
Defensive Verification Checklist:
- Audit authoritative DNS zone records for any CNAME pointing to
*.github.io. - Verify whether the target resource or bucket still exists under your organization's cloud tenant.
- If decommissioned, delete the DNS record immediately to close the public exposure window.
- Deploy a pre-merge IaC security gate (such as SubdomainWatch Takeover Guard) to intercept dangling records before pull requests merge.
# Delete orphaned GitHub Pages DNS record
# Or add GitHub Organization Domain Verification TXT record
resource "aws_route53_record" "github_verify" {
name = "_github-pages-challenge-yourorg.example.com"
type = "TXT"
records = ["your_github_token"]
}Why Static DNS Scanners Miss GitHub Pages Takeovers
Passive DNS repositories like SecurityTrails and heavy scanners like Detectify record domain records retrospectively or trigger alert fatigue. SubdomainWatch conducts active recursive CNAME testing with zero false positives.
GitHub Pages Takeover FAQs
Scan Your Domain for GitHub Pages Orphans
Test any hostname live. Our diagnostic engine traverses CNAME hops and verifies authoritative provider tokens in seconds without requiring an account.