sitehelper.online
FAQ: GitHub Pages HTTPS
← Back to FAQ overview
1) Does GitHub Pages support HTTPS for custom domains?
Yes. After adding a custom domain, enable “Enforce HTTPS” in Settings → Pages. GitHub provisions and renews a certificate automatically for supported domains. For apex domains without ALIAS support, use a redirect service or a small Caddy reverse proxy.
2) Why does my custom domain show a certificate mismatch?
Most often this is a DNS propagation or CNAME issue. Make sure the repo CNAME file and DNS CNAME match exactly (including www), then wait for propagation. Re-check with `dig +short yourdomain.com` and `openssl s_client -connect yourdomain.com:443 -servername yourdomain.com /dev/null | grep subject`.
3) Should I use www or apex?
Prefer www when possible. GitHub Pages provisions certs for the www subdomain and the apex if both are configured. If you must use apex and the provider has no ALIAS/ANAME, use a small VPS with Caddy to redirect apex → www.
4) How do I redirect apex to www cheaply?
A minimal Caddyfile does it:
example.com {
redir https://www.example.com{uri}
}
5) Why do I still see “Not secure” after enabling HTTPS?
Mixed content is the usual cause: the page loads over HTTPS but includes HTTP assets (images, scripts, fonts). Open DevTools Console → Security panel to find the blocked resource URLs, then update them to HTTPS or protocol-relative paths. Browsers cache HSTS; if fixes don’t appear immediately, test in a private window.
6) Will HTTPS slow down GitHub Pages?
No. GitHub Pages serves HTTPS at the edge over fast infrastructure. HTTPS adds a tiny handshake cost, but modern browsers keep connections alive for reuse. If you add a custom reverse proxy like Caddy, control session reuse and TLS session tickets in its config.