Help
cancel
Showing results for 
Search instead for 
Did you mean: 
Copilot Lvl 2
Message 1 of 13

Does GitHub Pages Support HTTPS for www and @ subdomains?

Solved! Go to Solution.

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?

12 Replies
Solution
Community Manager
Message 2 of 13

Re: Does GitHub Pages Support HTTPS for www and @ subdomains?

Hi @Tsmith18256,

Thanks for being part of the GitHub Community Forum!

GitHub doesn't currently support creating a certificate that covers both your root domain and your wwwsubdomain. We only generate a certificate for the exact domain that you specify in the custom domain input box. That said,  we're always working to improve GitHub, and we consider every suggestion we receive. I've logged your feature request in our internal feature request list. Though I can't guarantee anything or share a timeline for this, I can tell you that it's been shared with the appropriate teams for consideration.

 



Cheers!

Mark helpful posts with Accept as Solution to help other users locate important info. Don't forget to give Kudos for great content!

Ground Controller Lvl 1
Message 3 of 13

Re: Does GitHub Pages Support HTTPS for www and @ subdomains?

This answers my question -- I have two github projects with pages that are now HTTPS-enabled, but only for <name>.com.  Attempting "https://www.<name>.com/" makes Chrome complain loudly.  I'm hesitant to check the "force HTTPS" box because there's a lot of references to www.<name>.com.

 

The documentation on https://help.github.com/articles/setting-up-a-custom-subdomain/ seems to suggest that simply adding a CNAME will work -- the last step in the CNAME setup process is adding/removing to trigger HTTPS.  The docs should probably be updated to reflect the current state of things.

 

 

Community Manager
Message 4 of 13

Re: Does GitHub Pages Support HTTPS for www and @ subdomains?

Hi @fadden,

Thanks for this feedback! We're always working to improve GitHub, and we consider every suggestion we receive. Though I can't share a timeline for this, I can tell you that your feedback has been shared with the appropriate team.

Cheers!

 

Mark helpful posts with Accept as Solution to help other users locate important info. Don't forget to give Kudos for great content!

Copilot Lvl 2
Message 5 of 13

Re: Does GitHub Pages Support HTTPS for www and @ subdomains?

I'm having the same issue. Any word on a solution?

Community Manager
Message 6 of 13

Re: Does GitHub Pages Support HTTPS for www and @ subdomains?

Hi @isaacdozier,

 

This is currently not possible still. This may be released as a feature in the future, but I can't make any promises currently. Please keep an eye on the GitHub Changelog for information when this is released.

 

Thanks!

 

Ground Controller Lvl 1
Message 7 of 13

Re: Does GitHub Pages Support HTTPS for www and @ subdomains?

Support for both an apex and subdomain cert would be appreciated.

 

e.g. if I had the following in the CNAME file I'd expect them to both be covered:

 

somedomain.org

www.somedomain.org

 

Only allowing one to be covered by the cert isn't apparent when you set a site up.

 

Cheers.

Copilot Lvl 3
Message 8 of 13

Re: Does GitHub Pages Support HTTPS for www and @ subdomains?

 

May I suggest modifying the feature request about supporting subdomains, to automatically creating wildcard certificates for custom domains, so ANY subdomain is supported (not just www):

 

*.custom-domain.tld

 

See https://en.wikipedia.org/wiki/Wildcard_certificate

 

 

 

Copilot Lvl 2
Message 9 of 13

Re: Does GitHub Pages Support HTTPS for www and @ subdomains?

Is there any news on this topic? Or at least a confirmation that one day github will protect "example.com" and "www.example.com" via ssl?

Community Manager
Message 10 of 13

Re: Does GitHub Pages Support HTTPS for www and @ subdomains?

Hi @adrai,

 

At this point, there is no news on this front. Keep an eye on the GitHub Changelog to be notified of new features.

 

Thanks!