Mastering GitHub Pages Custom Domain Verification: A Deep Dive into DNS and Software Project Development Tools

Setting up a custom domain for GitHub Pages, a widely used feature among software project development tools, often seems straightforward. However, as one developer recently discovered, the process can sometimes hit unexpected snags, even when all external configurations appear correct. This community insight explores a detailed troubleshooting journey, highlighting critical DNS checks and the distinction between various verification steps.

A developer troubleshooting DNS records for GitHub Pages custom domain verification.
A developer troubleshooting DNS records for GitHub Pages custom domain verification.

The Persistent Problem: Unverified Domains and Unavailable HTTPS

Our discussion began with wonky-rig, who was attempting to set up wonkyrig.dicabreva.ru for a GitHub Pages repository. Despite the site being reachable over HTTP and the CNAME record correctly pointing to wonky-rig.github.io, GitHub Pages settings consistently alternated between "DNS Check in Progress" and "InvalidDNSError." Crucially, the "Enforce HTTPS" option remained unavailable. The core issue revolved around GitHub's inability to verify a publicly visible TXT record, _github-pages-challenge-wonky-rig.dicabreva.ru, which was essential for account-level domain ownership verification.

Initial Checks and Community Guidance

The community quickly rallied to offer comprehensive troubleshooting steps, emphasizing the need for meticulous DNS verification:

  • Exact TXT Record Match: Ensure the TXT record hostname (e.g., _github-pages-challenge-wonky-rig.dicabreva.ru) and its value precisely match what GitHub provides, without extra quotes or whitespace.
  • Authoritative Nameservers: Always query the authoritative nameservers directly (e.g., ns1.reg.ru, ns2.reg.ru) rather than just public recursive resolvers (like 8.8.8.8 or 1.1.1.1) to confirm the record is published at the source.
  • Distinguish Verification Types: Understand that account-level domain ownership verification (using a TXT record) is separate from GitHub Pages custom-domain routing (using a CNAME record). Both need to be correct.
  • Apex vs. Subdomain: If only a subdomain is intended for GitHub Pages, do not alter the apex domain's A records, which might be pointing to another service. The configuration should preserve existing apex hosting.
  • Stale Records: Check for any conflicting or outdated TXT records that might interfere with verification.
  • Propagation Time: Allow sufficient time (24+ hours) for DNS changes to propagate globally.

A useful command for checking TXT records directly via a public resolver is:

dig +short TXT _github-pages-challenge-wonky-rig.dicabreva.ru @1.1.1.1

When All DNS Checks Pass: A Deeper Look

After diligently following all community suggestions, wonky-rig confirmed that every aspect of their DNS configuration was correct:

  • The CNAME for the subdomain resolved correctly.
  • The site was accessible over HTTP.
  • The specific TXT record for verification existed with the exact value.
  • Both Google and Cloudflare DNS, as well as the authoritative nameservers, returned the correct TXT value.
  • No stale or wildcard DNS records were present.
  • DNSSEC was not broken, and CAA records permitted Let's Encrypt for HTTPS.
  • The configuration had been stable for over 24 hours.

Despite this exhaustive verification, GitHub continued to report the domain as "Unverified." This scenario highlights a critical point for developers leveraging software project development tools like GitHub Pages: sometimes, the issue might not lie in your configuration but within the platform's internal verification processes.

GitHub's system failing to verify a custom domain's TXT record despite correct external DNS.
GitHub's system failing to verify a custom domain's TXT record despite correct external DNS.

Key Takeaway for Developers

This discussion underscores the importance of thorough, methodical troubleshooting, especially when dealing with DNS. Developers should meticulously check every aspect of their DNS configuration, distinguishing between different types of records and their purposes. However, it also teaches us that there's a limit to what external checks can reveal. When all external indicators confirm a correct setup, and a platform still reports an error, it's time to escalate the issue directly to the platform's support team. This ensures that internal system states or specific provisioning issues can be investigated, moving beyond the scope of publicly verifiable DNS records.

For persistent issues with engineering statistics examples or domain verification on platforms, remember to gather all your authoritative DNS responses and verification details. This comprehensive data will be invaluable when contacting support, enabling them to quickly diagnose and resolve problems from their end.

|

Dashboards, alerts, and review-ready summaries built on your GitHub activity.

 Install GitHub App to Start
Dashboard with engineering activity trends