Search code examples
sslhttpsdnsssl-certificategithub-pages

Pointing GoDaddy DNS to GitHub page uses http over https


I have my DNS settings as shown in the image DNS Setting along with an additional CNAME with host www and value as my GitHub page. Next I setup a CNAME entry in my GitHub page with an apex entry to my domain. The issue I face is that whenever I visit my domain with an https protocol, it shows a warning that the connection is not secure. I get the following in Chrome:

NET::ERR_CERT_COMMON_NAME_INVALID

How do I fix this? I have both https and http access for my domain.


Solution

  • EDIT: Please see answer below by Arturo Herrero: https://stackoverflow.com/a/50203412/462015

    GitHub pages does not support HTTPS for custom domains.

    The only work around for doing so is to use an SSL provider as the middle man, such as Cloudflare. However, this would involve pointing your DNS name servers at Cloudflare's, which takes some time and complicates things.

    If you want HTTPS support using GitHub pages you'll have to use GitHub's provided URL instead of your custom domain.

    Another great option for static sites if you want custom domain name HTTPS is Amazon Web Services. You could set up an S3 bucket for your static website, configure CloudFront to distribute the static content, point your domain name at the CloudFront distribution, and use a free SSL certificate from Amazon's cert manager. This option comes out to less than $1/Month with a low-traffic website. A great in depth tutorial for that would be here.

    I hope this answered your question! GitHub pages is a great hosting option, and it's not the end of the world if you decide to forget about HTTPS.