How To Setup Naked Domain SSL With Github Pages

Add a free Cloudflare SSL certificate to your GitHub pages custom domain.

Create a free Cloudflare account and login. Add new site and scan the server, Cloudflare will return two name server addresses.

Add new site

Go to your domain registrar admin panel and add Cloudflare nameservers.

Next, on Cloudflare under DNS tab add your CNAME an A records in DNS menu in CloudFlare then click on status.

Add your CNAME an A records

Next, under Crypto tab add set Flexible SSL mode.

Flexible SSL mode

Next, under Page Rules tab add these two regex patterns:

Flexible SSL mode

Flexible SSL mode

Flexible SSL mode

Last step, go to your GitHub pages repository settings and set custom domain name.

Flexible SSL mode