Pointing GoDaddy DNS to GitHub page uses http over https

Custom domains on GitHub Pages gain support for HTTPS since May 01, 2018

https://blog.github.com/2018-05-01-github-pages-custom-domains-https/


UPDATE: Github introduced custom domain support for HTTPS on May 1, 2018.

If you are using GoDaddy and want to upgrade to HTTPS, do the following:

  1. Go to DNS settings for your site in your GoDaddy account.
  2. Remove all existing A records.
  3. Open a terminal and do dig +noall +answer <YOUR-USERNAME>.github.io. You should see a table listing 4 slightly different IP addresses: enter image description here
  4. On GoDaddy, create 4 new A records, each one pointing to one of the IPs. For host use @ and set the TTL to a low user-defined value (if you are in a hurry).
  5. Go to your page repository settings on Github, and clear the custom domain name and save. Wait a while (minutes).
  6. When executing dig +noall +answer <YOUR-CUSTOM-DOMAIN> yields the 4 IP addresses that you entered in the A records, go back to the Github repository settings and re-enter and save your custom domain name (which you just cleared) in the custom domain cell.
  7. Optionally, check the box Enforce HTTPS. But make sure that https://<YOUR-DOMAIN>is responsive first.

    • Make sure you have a CNAME record in your DNS settings also. Host should be www and it should point to your <YOUR-USERNAME>.github.io.
    • Make sure there is a file in your website repository named CNAME containing the name of your custom domain (in my case ulfaslak.com).

Reference


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.