Does GitHub Pages Support HTTPS for www and @ subdomains?

This worked for me as well – accidentally submitted a job app with the www link and 'bout **bleep** myself when they said my “website was down”.

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.

Thanks! :slight_smile:

edit: Would unmarking this as “solved” help bring more attention?

1 Like

Hey @jakejarvis,

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.

1 Like

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

but

$ 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.

1 Like

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

14 Likes

Cross-posted at https://github.com/isaacs/github/issues/1675, hopefully this can get some more visibility…

1 Like

When is this coming? +1

Thx for this, works perfectly

Here is a short list of some of the popular websites currently broken websites to demonstrate how pevasive this issue is in practice:

Any update on the timeline to address this issue would be appreciated.

5 Likes

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:

13 Likes

Hi guys, this is march 2020 and I am still having this issue, why havn’t Github team responded yet?

2 Likes

Finally found a workaround to this today!

What I did was

  • In the DNS Editor of my domain (I use GoDaddy) I added a CNAME with www as the _host, _which points to ourcompany.github.io
  • In the settings on the repository where I used to have salt.dev - I switched it to be www.salt.dev
  • The CNAME file in my repository just contains salt.dev

Now it works properly for me.

https://www.salt.dev/

https://salt.dev/

1 Like

Finally found a workaround to this today!

What I did was

  • In the DNS Editor of my domain (I use GoDaddy) I added a CNAME with www as the _host, _which points to ourcompany.github.io
  • In the settings on the repository where I used to have salt.dev - I switched it to be www.salt.dev
  • The CNAME file in my repository just contains salt.dev

Now it works properly for me.

https://www.salt.dev/

https://salt.dev/

4 Likes

@miesmandoki You just fixed it temporarily, because it already created the SSL certificate for salt.dev (without the www), and by switching it now also created the SSL certificate for www.salt.dev, but it will only renew the latter, so when the SSL certificates expires, you’ll have the same problem

2 Likes

@laurensv wrote:

@miesmandoki You just fixed it temporarily, because it already created the SSL certificate for salt.dev (without the www), and by switching it now also created the SSL certificate for www.salt.dev, but it will only renew the latter, so when the SSL certificates expires, you’ll have the same problem

Are you sure?

If that’s the case - then all I’d need to do is switch it back and forth once every three months to renew the certificates, correct?

If that’s all it takes and the certificate is still available, this definitely seems like something GitHub should go ahead and implement…

Thanks man it works now!  So annoying, lol.

@tsmith18256 wrote:

I got one of the new .app TLDs that went live today, and I am trying to point it to Github pages. I want the default URL to be without the www (host: @) and for the www to redirect to the default. I have set the domain without www in my pages repo settings, enabled https, and done the A and CNAME records in my DNS.

 

The A record is working fine, it loads my site with no www. The CNAME for www is causing an issue with the SSL certificate though. If I open the site in Edge, postman, curl, etc, it works fine; however, .app requires HTTPS and Chrome knows that, so it doesn’t even bother trying http and goes straight to the HTTPS version when you type www. This gets an error because Github returns the github.com certificate, and not my own.

 

Is there a fix for this?

yes how?
thank

1 Like

Cmon, github, I just set up everything properly (3 days of work) and boom! at the very end it turns out that you do not support https for apex and subdomains?

Please please please fix this.

More discussion here:

https://stackoverflow.com/questions/9082499/custom-domain-for-github-project-pages

and here:

https://github.com/isaacs/github/issues/1675

3 Likes

Is there an update / roadmap on this? Because of how different browsers handle autofilling with www and without, github pages might as well not work with custom subdomains if the cert doesn’t support BOTH www and apex