CNAME-only configuration fails HTTPS certificate deployment unless A record exists #187633
Replies: 5 comments 1 reply
-
|
💬 Your Product Feedback Has Been Submitted 🎉 Thank you for taking the time to share your insights with us! Your feedback is invaluable as we build a better GitHub experience for all our users. Here's what you can expect moving forward ⏩
Where to look to see what's shipping 👀
What you can do in the meantime 💻
As a member of the GitHub community, your participation is essential. While we can't promise that every suggestion will be implemented, we want to emphasize that your feedback is instrumental in guiding our decisions and priorities. Thank you once again for your contribution to making GitHub even better! We're grateful for your ongoing support and collaboration in shaping the future of our platform. ⭐ |
Beta Was this translation helpful? Give feedback.
-
|
Hi there, @ykla! 👋 Thanks for the detailed report. Based on the current GitHub Pages documentation, the recommended DNS configuration depends on whether you're using a root domain or a subdomain. A CNAME-only setup is supported for subdomains, but root domains require specific A records pointing to GitHub Pages. You can review the official guidance here: Configuring a custom domain for your GitHub Pages site We recommend aligning the DNS configuration with the documented setup and removing any unrelated records. If the issue persists after that, feel free to share more details. Hope it helps! |
Beta Was this translation helpful? Give feedback.
-
|
I read through your issue carefully, and I think the maintainer's response missed the point — you're clearly talking about a subdomain, not an apex domain. A subdomain with a CNAME pointing to What you're describing sounds like a bug in GitHub Pages' DNS validation logic. Here's what I think is happening under the hood: When you set a custom domain in Pages settings, GitHub runs a DNS check before provisioning the Let's Encrypt certificate. For subdomains, it should only need to verify the CNAME resolves to The fact that adding a dummy A record on the apex (even A few things you can try as proper workarounds (instead of pointing at 1) If you own the apex domain and don't use it for anything else, add the actual GitHub Pages A records to the apex: 185.199.108.153 185.199.109.153 185.199.110.153 185.199.111.153 This way the apex resolves to GitHub's IPs (which is at least semantically correct), and your subdomain CNAME continues to work as expected. The cert should provision immediately after that. 2) After adding the custom domain in Pages settings, try removing it, waiting a minute, and re-adding it. Sometimes this kicks the certificate provisioning process to retry the DNS check fresh. Combined with the apex A records above, it tends to work. 3) If you've done all of that and the DNS check is still stuck, open a support ticket with GitHub. This is a real bug in their validation logic — a subdomain CNAME should not depend on the apex domain having records. You've already done the hard debugging work (reproducing across Cloudflare, EdgeOne, and DNSPod), so you have solid evidence. Honestly I think you should file this as a bug regardless, because pointing the apex at |
Beta Was this translation helpful? Give feedback.
-
|
Keep in mind records you add to the APEX domain factor in the ironically fraudulent anti-fraud service metrics most notably IPQualityScore.com: they take delight in false positives. All records changes are forever recorded in many elsewheres. Does the APEX A-RR need be public routable? |
Beta Was this translation helpful? Give feedback.
-
|
This is likely related to how apex (root) domains are handled in DNS + GitHub Pages validation, rather than a strict requirement for an A record itself. A few key points that explain what you’re seeing:
For root domains (e.g., example.com), standard DNS technically doesn’t allow a pure CNAME. Some providers (Cloudflare, DNSPod, etc.) simulate this using: ANAME / ALIAS / flattening But GitHub’s validation system may not always interpret these consistently.
For apex domains, GitHub officially recommends: A 185.199.108.153 Even if a provider “supports” CNAME at root, GitHub’s certificate/DNS checks often rely on direct A/AAAA resolution.
Adding: A 8.8.8.8 doesn’t actually route traffic correctly, but it: makes the domain resolvable via A record So it’s acting as a validation bypass, not a proper fix.
So you get a valid cert but inconsistent “secure” status.
For apex domain: A 185.199.108.153 For subdomain (e.g., www): CNAME .github.io You’re not wrong — the confusing part is: Some DNS providers do allow CNAME-like behavior at root So it looks like: “CNAME should work, but GitHub still expects A records” TL;DR Definitely a valid DX issue — the system could communicate this requirement much more clearly 👍 |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Select Topic Area
Bug
Body
CNAME-only configuration fails HTTPS certificate deployment unless A record exists
Description
When configuring a custom domain (e.g.,
xxxx) with only a single CNAME record pointing to<username>.github.io, HTTPS certificate deployment fails unless an A record also exists for the domain.This behavior has been reproduced using DNS providers such as Cloudflare(no proxy or proxy), EdgeOne, and DNSPod.
DNS Configuration
Initial configuration (failing case):
No A record exists.
Observed Behavior
HTTPS certificate deployment does not complete properly.
The system reports:
Accessing
https://xxxx:The system also reports that DNS records cannot be detected.
Workaround
After adding an A record pointing to
8.8.8.8(Google Public DNS):HTTPS certificate deployment immediately succeeds and DNS detection works correctly.
Expected Behavior
A CNAME-only configuration pointing to
<username>.github.ioshould be sufficient for:The system should not require an unrelated A record for certificate deployment to function properly.
Additional Notes
Beta Was this translation helpful? Give feedback.
All reactions