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

Unable to get GitHub Pages with a custom domain with www subdomain and HTTPS to play nicely together

Solved! Go to Solution.

We're in the process of migrating www.defold.com from a proprietary site to GitHub Pages and in general everything is working well (Jekyll and static site generation works great!) BUT I'm unable to get our domain set up properly:

 

* Typing http://www.defold.com ends up as https://defold.com and site loads as expected

* Typing http://defold.com ends up as https://defold.com and site loads as expected

* Typing https://defold.com works and site loads as expected

* Typing https://www.defold.com DOES NOT WORK - Browser responds with "Your connection is not private"

 

Clicking the lock icon next to the adress on the three working examples above shows "Let's Encrypt Authority" which seems to indicate that GitHub has generated SSL certificates as expected. The question is what goes wrong in the https://www.defold.com case though? I've seen similar issues but I don't really see what I've not configured correctly. This is how the site and DNS records are configured:

 

The site exists in organization repo github.com/defold/defold.github.io (private). In repo settings the Custom Domain field is set to `defold.com` and `Enforce HTTPS` is checked. No error is shown on the Settings page. The repo contains a CNAME file containing `defold.com` (which I believe gets auto generated by GitHub?).

 

We're using AWS and Route 53 for DNS configuration. For defold.com we have an IPv4 A record with value:

 

* 185.199.109.153
* 185.199.108.153
* 185.199.110.153
* 185.199.111.153

 

For www.defold.com we have a CNAME record with value:

 

* defold.github.io

 

What could be wrong?

5 Replies
Community Manager
Message 2 of 6

Re: Unable to get GitHub Pages with a custom domain with www subdomain and HTTPS to play nicely toge

It looks like you got it working in the intervening time? (At least, clicking on the various links seems to work in all cases for me.) Can you confirm that things are working as expected for you?

 

Let us know.

Solution
Copilot Lvl 3
Message 3 of 6

Re: Unable to get GitHub Pages with a custom domain with www subdomain and HTTPS to play nicely toge

Ah, yes, sorry. We got it working by rerouting DNS queries.

 

https://github.community/t5/forums/replypage/board-id/pages/message-id/2165/load-autosave/true

Copilot Lvl 3
Message 4 of 6

Re: Unable to get GitHub Pages with a custom domain with www subdomain and HTTPS to play nicely toge

@lee-dohm  It seems like @britzl's using a band-aid fix by having Cloudfront handle the www site, is that correct? Definitely not an ideal solution...

 

@britzl Unfortunately there's a long discussion about this at https://github.community/t5/GitHub-Pages/Does-GitHub-Pages-Support-HTTPS-for-www-and-subdomains/m-p/... that's been going on for almost a year — I'm dying to have this feature too, I hate having to depend on yet another service just to get HTTPS on a www redirect like the rest of the internet! ;)

Copilot Lvl 3
Message 5 of 6

Re: Unable to get GitHub Pages with a custom domain with www subdomain and HTTPS to play nicely toge

Jake! I completely agree with you and I really thought it was covered by GH Pages when I read the docs. I don't want to rely on additional services either, but we had to release the new www.defold.com site so we couldn't really wait.

Copilot Lvl 3
Message 6 of 6

Re: Unable to get GitHub Pages with a custom domain with www subdomain and HTTPS to play nicely toge

Not judging you at all to be clear, I'm doing the same exact thing actually! :)

 

Agree that they should make this much clearer in the docs if this isn't going to be fixed anytime soon...