http to https redirect error

Hi
When I try to redirect my website to https from http, an error occurs stating too many redirects occurred.
Thanks

@bakefree it happens because your website address is https while you don’t have SSL certificate it redirect to non-secure http but you set your website address to https so it redirect http to https and https redirect to http and too many redirect is occurr.
The solution is change your website address from https to http or http to https if you have SSL certificate. If you are using Cloudflare SSL so please first disable always https in Cloudflare setting.
This may also happens if you have SSL certificate but you set your website address to http instead of https.

@Ranakhas I am not using Cloudflare SSL and I do have a certificate. Please could you advise me on how to fix this problem?

@bakefree are you using WordPress??

What code do you use to force the HTTPS redirect? Please see this FAQ article for examples: https://infinityfree.net/support/how-to-force-all-traffic-to-https/

@Admin said:
What code do you use to force the HTTPS redirect? Please see this FAQ article for examples: https://infinityfree.net/support/how-to-force-all-traffic-to-https/

Thanks - that code worked