GitHub Pages custom domain: ERR_SSL_PROTOCOL_ERROR
GitHub Pages custom domain showing ERR_SSL_PROTOCOL_ERROR to some visitors? Check stale DNS, extra records, CAA, Cloudflare proxy and HSTS, step by step.
The Liite team8分で読めます
Short answer
When only some visitors get ERR_SSL_PROTOCOL_ERROR, the usual cause is that their DNS path still reaches a server that has no certificate for your domain. This is often old or extra A, AAAA or CNAME records, or a proxy in front of the site. Compare DNS answers from several resolvers, delete every record GitHub doesn't list, then remove and re-add the custom domain in the Pages settings.
Your GitHub Pages site has a custom domain, the certificate looks valid, and it loads fine for you. Then someone tells you Chrome shows this:
This site can't provide a secure connection
with the code ERR_SSL_PROTOCOL_ERROR. Nobody has pinned this to a single cause, so the fixes below are ordered by how often they are likely to matter, and the proxy and HSTS items are diagnostics rather than guarantees.
Why it happens
People on Reddit and on Netlify's community forum describe the same pattern: a valid certificate, but only some visitors fail. The explanations they offer are not proven in every case. These are the ones that hold up against GitHub's own documentation, most common first.
- Extra or stale DNS records. GitHub says an HTTPS certificate can fail to generate because of extra DNS records, or records that don't point to the GitHub Pages IP addresses. A leftover record from a previous host can send some lookups to the wrong server, and that server can't complete a TLS handshake for your name.
- Different resolvers answering differently. After a DNS change, some resolvers keep the old answer until the TTL runs out. That makes the failure look random: it works for you and fails for a visitor on another network.
- A proxy or CDN in between. If the record is proxied (Cloudflare's orange cloud, for example), the visitor talks to the proxy's edge, not to GitHub. A mismatch between the proxy's SSL mode and GitHub's setup shows up for some edges or visitors first. This is a common report, not something GitHub documents.
- A CAA record that blocks the issuer. If you use CAA records, at least one must exist with the value letsencrypt.org for the site to be reachable over HTTPS.
- A cached HSTS rule. If a browser has seen an HSTS header for your domain, it won't fall back to plain HTTP. A temporary mismatch then looks like a hard failure with no click-through.
- Certificate not issued yet. It can take up to an hour for the site to be available over HTTPS after you configure a custom domain.
Step-by-step fixes
1. Reproduce it from another network
- Open the site on your phone over mobile data, in a private window.
- Try a second browser on a different network if you can.
If it fails there and works on your home Wi-Fi, the difference is in what DNS returns, not in the certificate itself.
2. Compare DNS answers from several resolvers
Run these (replace example.com with your domain):
dig example.com +noall +answer -t A
dig example.com +noall +answer -t A @1.1.1.1
dig example.com +noall +answer -t A @8.8.8.8
dig example.com +noall +answer -t AAAAFor an apex domain, GitHub's documentation lists these four A addresses:
185.199.108.153
185.199.109.153
185.199.110.153
185.199.111.153The answers should match each other and match that list. If you use IPv6, GitHub also lists four AAAA records starting 2606:50c0:8000::153. GitHub recommends keeping A records alongside AAAA records because IPv6 adoption is still slow. The addresses can change, so check GitHub's custom domain documentation for the current list.
3. Delete conflicting records
Open the DNS settings at your DNS provider, not at GitHub. GitHub warns that additional A, AAAA, ALIAS or ANAME records on the @ host, or CNAME records on your www or other subdomain, may stop the certificate from generating. Also remove any default or parking record your provider added, plus URL-redirect records for the same host. If your DNS provider automatically sets a default record, remove it.
For a www subdomain, the CNAME must point to <user>.github.io or <organization>.github.io without the repository name. Pointing a custom subdomain at your apex domain causes problems with enforcing HTTPS.
4. Check CAA records
dig CAA example.comIf the command returns CAA records, one of them must allow letsencrypt.org. If it returns nothing, you have no CAA restriction and can skip this step.
5. Remove and re-add the domain in GitHub
- In the repository, open Settings > Pages.
- Next to your custom domain, click Remove.
- Retype the domain and click Save.
- Wait for the check mark beside the domain, then turn on Enforce HTTPS.
After you update existing DNS settings, you may need to remove and re-add the domain to trigger the process of enabling HTTPS. GitHub says this cancels and restarts certificate provisioning. The Enforce HTTPS option can take up to 24 hours to become available.
Cloudflare users
Switch the record from proxied to DNS only for a while. If the error disappears, the problem sits between Cloudflare and GitHub, so review Cloudflare's SSL/TLS mode before turning the proxy back on. Users report this clears the error, but it is a diagnostic, not a confirmed fix.
6. Check HSTS for the stuck visitor
If your DNS is now correct and one visitor still fails, a cached HSTS rule may be involved. Another browser or network is the practical workaround while records settle. Telling them to type http:// won't help, because the browser upgrades the request anyway.
7. Wait for propagation
After a DNS change, resolvers refresh when the TTL expires. If all the dig answers agree, most affected visitors recover without doing anything.
Cause, symptom and fix at a glance
| Cause | Typical symptom | Fix |
|---|---|---|
| Old or extra A/AAAA/CNAME records | Some resolvers return other IPs | Delete them at the DNS provider |
| Resolvers not yet updated | Fails on one network, works on another | Wait for TTL, re-check with dig |
| Proxy in front of GitHub | Fails until proxy is off | Set to DNS only, review SSL mode |
| CAA without Let's Encrypt | HTTPS never becomes available | Add a letsencrypt.org CAA record |
| Certificate still provisioning | Fresh domain, no check mark | Wait, then remove and re-add |
| Cached HSTS | One browser fails, others fine | Use another browser while fixing DNS |
Check GitHub Status
A temporary platform problem is possible. Look at GitHub's status page before you change records.
Checklist before you try again
- Every
diganswer, from every resolver, shows only GitHub's addresses. - No leftover A, AAAA, CNAME or URL-redirect records for the same host.
- The CAA answer is empty, or includes
letsencrypt.org. - The domain in Settings > Pages matches the one in your DNS, with no typos.
- The check mark shows next to the domain before you enable Enforce HTTPS.
- You've tested from a second network.
What won't help
- Reissuing again and again. A valid certificate doesn't help a visitor who is routed to the wrong server.
- Trusting your own browser. The failure is on the visitor's DNS path, so your success proves little.
- Using wildcard DNS records. GitHub strongly advises against them because they put you at risk of domain takeovers.
If nothing works
Contact GitHub Support if the domain shows a verified check mark and DNS is clean but visitors still fail. Include your domain, the exact error, the time and region of failures, and the dig output from several resolvers. If you use a proxy, ask that provider too.
Subject: ERR_SSL_PROTOCOL_ERROR on GitHub Pages custom domain for some visitors
Domain: example.com
Repository: username/repo
Error in Chrome: "This site can't provide a secure connection" (ERR_SSL_PROTOCOL_ERROR)
Affected: some visitors only; works from my network
Started: <date and time, with time zone>
Checked: dig A/AAAA/CAA from my resolver, 1.1.1.1 and 8.8.8.8 (output attached)
Done: removed extra records, removed and re-added the domain in Settings > Pages
Please check the certificate and TLS termination for this domain.Common questions
Does this happen on Netlify too?
Yes, people report the same pattern there: a valid certificate and a partial failure. That points to DNS and caching more than to one platform, so the dig comparison is worth running on any host.
Should I use an apex domain or www?
GitHub recommends always using a www subdomain, even if you also use an apex domain. It tries to secure the other one automatically, but you still need to make the DNS changes.
How long should I wait after changing DNS?
For GitHub, up to an hour before HTTPS is available, and resolvers may keep old answers until the TTL expires. If it's been a day with consistent dig results, something else is wrong.
Can I fix this by clearing my browser's cache?
Only for your own browser. If your visitors are affected, clearing your cache changes nothing for them.
Moving a finished HTML site to Liite
Liite is a partial fit here. A custom domain is a Pro and up feature, one per site. You add the DNS records shown in the dashboard, the status turns Active, and the HTTPS certificate is set up automatically. That doesn't remove DNS mistakes, because stale records at your registrar cause trouble on any host. Liite serves static files only, with no build step or Git deploys, so it suits a finished HTML site. See custom domains in the docs.