The issue can be resolved by using the Cloudflare Flexible SSL.
This is pretty straight forward. Find the below steps.
- Install the Cloudflare Flexible SSL plugins.
- Activate the installed plugins.
- Enable the Your SSL/TLS encryption mode in Flexible.
- Make sure to enable the below setting.
Always Use HTTPS : Redirect all requests with scheme “http” to “https”. This applies to all http requests to the zone.
Note : Please clear the cache if there is any issues.