In my last post’s I explain how to redirects no HTTP request to HTTPS in Node.js application and in Cakephp3 application, Now if you are using Cloudflare then this is very easy without writing any line of code you can redirect all traffic to HTTPS follow below steps to do that.

Step 1. Login to your Cloudflare account.

Step 2. Click on Page rule button and add new rule

Redirect all visitors from http to https using cloudflare

and your site info and set rule

Redirect all visitors from http to https using cloudflare

All done refresh your site 🙂