You want to set up your own domain on github pages using SSL ? Here is what you can do

Prerequisite

You have a STATIC website stored on github.io
And you can access your website through the url
https://mywebsite.github.io

1. Go to cloudflare.com and register

Why : cloudflare provides free universal SSL (and other nice things we don’t really care right now)

What to do:

At the end, Cloudflare will give you two nameservers. They will look like

bob.ns.cloudflare.com
tia.ns.cloudflare.com

Copy them.

2. Go to your Registrar (the company you paid in order to register your domain)

From now on, the DNS zone of your registrar admin panel is useless.
Only the DNS zone from Cloudflare admin panel matters. It means that any DNS modification like adding TXT record, or CNAME… will have to be done through Cloudflare.

Note: Confuse about the difference between DNS servers and DNS zone ? click here

3. Go back to Cloudflare, only this matters now.

Check that Cloudflare has imported every configuration from your registrar DNS zone

Don’t forget to activate Cloudflare for each row, by clicking the grey cloud until it turns orange ! turn cloudflare on

Set up the 2 CNAME redirections to your github.io static website as bellow:
screenshot

4. In Cloudflare admin, Go to “Crypto”

And click Flexible:
screenshot

Note that the status of the certificate is “Authorizing Certificate” which stands for pending. Until it goes to “Active Certificate” you should enable http connection so that there is no downtime to your service. Once it is Active, you will switch to “Full” and only https will be available.

5. In Cloudflare admin, Go to “Page Rules”

Set up the rule that will force redirection from http to https. Exemple for the website goyllo.com is bellow

screenshot

6. Go to Github

Create a CNAME file

screenshot

Write the url of your website. If you want people to go on your website without www, write: mywebsite.com

screenshot

7. WAIT for a long time…

It may take 1 or 2 days before everything is fully operational. So if you errors like “ERR_SSL_VERSION_OR_CIPHER_MISMATCH” or “SSL_ERROR_NO_CYPHER_OVERLAP” just WAIT. DNS propagation in the network can take a while, and registrar usually take it slow…

Ressources

cvan blog: Tutorial I followed for the most part

cloudflare tuto: Official ressource from Cloudflare on how to do this

dns help: What you need to know about DNS is in their FAQ