Redirect loop with SSL and Cloudflare

Hey. I recently started using Cloudflare and added a SSL certificate in the Cpanel. On Cloudflare, I setted up the SSL settings too and set it to Full and made a page rule to redirect all HTTP requests to HTTPS. It worked and everything was in HTTPS. Until the next day, when I check onto the page, it can’t load because of a redirect loop. Then, I found out that something was redirecting all HTTPS requests to HTTP! :frowning: I think it’s InfinityFree, because I didn’t set anything to do that. Cloud someone help me? Please? :slightly_smiling_face:

Hello there,

Could you provide us your site URL?
We would like to check your problem on our end.

The link is hafg.ml

Hello,

Your site is loading fine here.

Check your WP General Settings and make sure your WordPress URL and Site Homepage URL has the https:// prefix.

1 Like

There is https:// there and it still occurs, but the loop isn’t there anymore (not sure if I turned off the page rule) but it still redirects HTTPS to HTTP.

Hello,

Can you try using this rule instead on your .htaccess file:

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

After adding that the loop is back :neutral_face:

Then delete that.
Can you refer to this Cloudflare support article:
https://support.cloudflare.com/hc/en-us/articles/115000219871-Troubleshooting-redirect-loop-errors

I tried everything there before posting here… Tried now as well, still doesn’t work

A post was split to a new topic: Name servers of custom domain

@FastLukas12345 Maybe try to read this article?

https://infinityfree.net/support/wordpress-and-cloudflare-flexible-ssl/

5 Likes

My issue got fixed by installing Really Simple SSL, thanks for the help! :smiley:

3 Likes

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.