Hosting (5 Part Series)
Seen the error image before?
This happens when you visit my personal website, harishv.me, with a
www in front. This redirects to https://harishv.me and all you will see is this
ERR_SSL_PROTOCOL_ERROR as the site is unable to provide a secure connection.
If you are using a normal GitHub Pages site, which means it has a domain that has
.github.io, you can simply go to the GitHub repository you are using, click settings, go all the way down till you see
Enforce HTTPS. Clicking this will mean that your site will always be served over HTTPS.
When researching free SSL options to add onto my website, I found that you can actually use Cloudflare’s name servers under their free plan to obtain a SSL certificate for your website.
- Create a Cloudflare account
- Allow Cloudflare to scan your website records
- Check and verify that the automatically generated records by Cloudflare matches with those on your registrar’s page (in my case, this is Namecheap.com)
- Cloudflare will now give you 2 nameservers to add into your account
- Login to Namecheap
- Click on Domains List
- Select the domain you want to add SSL for and click on
Manageat the right side
- Under nameservers, copy and paste the 2 nameservers Cloudflare gave you
- Once done, on Cloudflare’s Overview tab, click on
Cloudflare also offers up to three page rules in the free plan. With this, we can always enforce a `https on our website. To do that,
- Click on the Page Rule tab at the top in Cloudflare
- Enter this:
- Add the settings to be
Always Use HTTPS
- Click on
Save and Deploy
The asterisks are like wildcard patterns which means any URLs entered in that format will be enforced to utilise HTTPS connection. For example, www.harishv.me or http://harishv.me/blog will all now be enforced with HTTPS.
That’s all folks. Get your free SSL certificate with Cloudflare now!
P.S. If you’re wondering why is HTTPS that big of a deal, wait a few days for my next article on HTTPS - What’s the Big Deal?.
- If you want the best Wordpress hosting, I highly recommend Bluehost. Get a great discount when you apply through this link.
- Also, get a massive discount with Hostinger when you apply through this link.
Both services offer great uptime and customer service. Oh did I mention - you get a free domain name with both Bluehost and Hostinger!