In this blog post, I’ll show you how to set up HTTPS on your website using a free CDN like Cloudflare. There are many benefits of encrypting traffic over HTTP such as improved security and search engine ranking. It’s also an important step in improving the privacy of internet users everywhere!

Setting up Cloudflare to only use HTTPS is pretty straightforward.

In Cloudflare settings

  1. Login to Cloudflare >> select the site
  2. Go to SSL/TLS tab >> Edge Certificates
  3. Turn ON “Always Use HTTPS
Always Use HTTPS
Always Use HTTPS

Alternative Method

The other way is to use page rules.

  1. Go to Page Rules
  2. Click “Create Page Rule”
  3. Enter the URL (put the asterisk, so all URLs are redirected)
  4. Click “Add a Setting” and select “Always Use HTTPS” from the drop-down
  5. Click “Save and Deploy
Page Rule
Page Rule

After a few minutes, all URLs will be directed via HTTPS. Check your site for mixed content (HTTPS vs. HTTP); having HTTP assets will cause your site to break.