In here, we learn all the steps required to add HTTPS with a custom URL using Github pages. Yes, we can add “HTTPS” or SSL certificate to our own website using Github pages without paying any money. Most importantly, my website( has also added HTTPS by using these techniques.

All we need to have a custom domain name hosted using Github Pages. I do blogging through this technique without paying any fee. As always, there is no charge for adding SSL certificate to Github pages.

1. What is HTTPS?

Hypertext Transfer Protocol Secure (HTTPS) is an extension of the Hypertext Transfer Protocol (HTTP) for secure communication over a computer network and is widely used on the Internet.

In HTTPS, the communication protocol is encrypted using Transport Layer Security (TLS), or formerly, its predecessor, Secure Sockets Layer (SSL). The protocol is therefore also often referred to as HTTP over TLS, or HTTP over SSL.

2. What is the Purpose of HTTPS?

HTTPS encrypts traffic between GitHub’s servers and your browser giving you confidence that the page you asked for is the page you’re reading, from the site you think it is, and that others can’t snoop on or modify its contents along the way.

The principal motivation for HTTPS is authentication of the accessed website and protection of the privacy and integrity of the exchanged data while in transit.

It protects against man-in-the-middle attacks. The bidirectional encryption of communications between a client and server protects against eavesdropping and tampering of the communication.

In practice, this provides a reasonable assurance that one is communicating without interference by attackers with the website that one intended to communicate with, as opposed to an impostor.

3. Adding "HTTPS" to Github Pages with Custom Domain.

Adding HTTPS to Github pages with a custom domain is as easy as adding a CNAME file to Github. Importantly, we are going to add an SSL certificate to our custom domain using Github pages.

All we need to follow these steps respectively. Ok, let us get started.

After creating and uploading CNAME file with a custom domain name in it as shown in the previous post, login into Github repository page then, scroll down to the repository settings page, then you will find a section called “Github Pages” as shown in the image below.

Setting HTTPS-Enforce to Github Pages.

Make sure that you have checked “Enforce HTTPS” button and hit the save button. That’s it, after a while our custom domain website runs with HTTPS request, ensuring users who request your site over HTTP are upgraded to HTTPS.

Github Public Announcement.

Github has partnered with the certificate authority Let’s Encrypt on this project. As supporters of Let’s Encrypt’s mission to make the web more secure for everyone, we’ve officially become Silver-level sponsors of the initiative.

Thank you for reading this tutorial.