I'm just trying out github pages and have the same issue.
Maybe it's best to just create separate repositories (github pages) with the same contents for www.example.com and example.com? I would just setup A records for both @ and www?
"You must configure www subdomain and root domain redirects with your domain registrar."
What does that mean?
And this doc states that it's better to use www:
So it's better to redirect example.com to www.example.com? Though github.com doesn't do this!
Any further news? I'd love to use gh-pages but I really want domain.com, www.domain.com and SSL for both.
It would be great to get an update on this from GitHub - is this feature being actively developed?
Sorry for jumping on the "any updates?" bandwagon but this would be a HUGE help! I've been trying to find an easy solution to suggest to people in this situation and there doesn't seem to be much out there that are both one-click and reliable, unless they're lucky enough to have used a registrar that does this like Google Domains does.
It seems like a pretty safe assumption that if someone enters an apex domain then they'll want www to mirror it/redirect to it — wanting different content at @ and www is a super rare edge case (and probably accidental if it does occur, to be honest). My vote is for adding www as an alt name on the LE certificate when generating it by default if the user inputs an apex domain as the custom domain.
edit: Would unmarking this as "solved" help bring more attention?
Thanks for being here! At this time we don't have any news to share, but be sure if there is an update to this request this thread will be notified.
Mark helpful posts with Accept as Solution to help other users locate important info. Don't forget to give Kudos for great content!
Thanks for describing the problem Tsmith18256 and thanks nadiajoyce for the answer. I'm having the same problem (but with .com) and found this thread. Just want to add +1 for this feature.
So currently for me:
$ curl -I http://www.sergeyalekseev.com HTTP/1.1 301 Moved Permanently Location: https://sergeyalekseev.com/
$ curl -I http://sergeyalekseev.com HTTP/1.1 301 Moved Permanently Location: https://sergeyalekseev.com/
$ curl -I https://sergeyalekseev.com HTTP/2 200
$ curl -I https://www.sergeyalekseev.com curl: (51) SSL: no alternative certificate subject name matches target host name 'www.sergeyalekseev.com'
In my view it totally makes sense to generate an SSL certificate for a www version as well.
I get that the feature isn't available yet, but I find it really disturbing that the "Configuring an apex domain" doc explicitely suggests to set up both a www and an apex domain, without mentioning that this is just incompatible with using HTTPS. Thit is very misleading.
Cross-posted at https://github.com/isaacs/github/issues/1675, hopefully this can get some more visibility...
Just to demonstrate how common this issue is in practice, I've compiled a list of popular websites that are broken due to GitHub Pages incomplete implementation: