Redirect loop when enable orange cloud

Hey all,

I’ve got an issue with which I have been setting up. The main domain points to clickfunnels, while the blog subdomain points to a hosting server via an A record. When I enable the orange cloud, the site goes into a 301 redirect loop and I haven’t been able to find the answer as to why yet…
Also, (maybe this is related) the home page URL defaults to http instead of https, even though every other page on the the blog does https. I’ve checked WP general settings (tried both http and https setting) and installed the Cloudflare plugin (enabled “rewrite to https”), but no dice…
So lost, plz halp…


hi @learn have a look at this see if it can help

Additionally, please ensure that there is no redirect set up at your origin from http to https, as this specifically would cause the redirect loop.

I saw that guide already, but no help for me there.
I figured it out partially. When I was originally trying to fix the issue with my home page not being https, I set up a rule on Cloudflare:*
301 to$1
I disabled that and now there is no redirect loop, but now nothing on the site goes to https! I’ve got the domain setting set to flexible SSL and turned on Automatic HTTPS Rewrites in the Cloudflare WP plugin…

Now I switched the general URL settings in wordpress to https. All pages go through https, but not the home page…


Sorry for late reply, I just checked your .blog and main domain they both HTTPS, Did you manage to fix it?


is the main blog page showing up as https for you? if you just type in the url and hit enter?

1 Like

Yep, all good here

1 Like

Frealz? That is so weird…
Cache and cookies cleared, incognito window and it goes to http version. On my mobile too (not on the same WiFi)…

It’s http for me also. @danstock’s browser probably cached https url.

You can do it server side or you can create a page rule “Always use HTTPS”.

1 Like

@cyBerManIA yes looking like cached, was just about to mention ‘always use https’ good shout!

1 Like

Well, fancy that. The rule worked…
I wonder though why it did that in the first place…

1 Like

enable ‘always use https’ for your main domain too, as you can access it via http/https still

Oh, right on. Thank you!

@learn no problem , all good now

Sorry to jump on but I have a sorta similar issue and can’t ask my own question…

I am a not-super-technical user who is stumped and could use some help here.

I recently set up jetpack premium for backups but couldn’t get it connected. Hosting co said “turn off Cloudflare temporarily” so I did. Only now when I turn Cloudflare back on I’m in the abyss of infinite loop. Dreamhost is perplexed and said “Go ask Cloudflare” - so here I am.

I have strict SSL and have force https rewrite rules in my .htaccess file and on Cloudflare. The infinite loop stops as soon as I shut down Cloudflare. It USED to work prior to enabling jetpack - not sure if that’s relevant?

But I’m stumped. Right now enabling Cloudflare breaks everything and if I can’t figure out WHY I’ll have to stop using it :frowning: Help please?


While using Cloudflare, this is the right way to force HTTPS via .htaccess

You may try to replace your current force https rule with below.

RewriteEngine On
RewriteCond %{HTTP:X-Forwarded-Proto} !https
RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L]

This rule should work fine for you.

Thanks @anon13899255! I am terrified of the .htaccess file but had found that on various pieces of docomentation (please know I don’t understand how to read .htaccess code). I have tired these two variants I have found:

RewriteCond %{HTTP:X-Forwarded-Proto} !https
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
RewriteCond %{HTTP:X-Forwarded-Proto} !https
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

Neither seem to resolve the issue with Cloudflare.


You should take backup of that file; then you may proceed it step by step.

  1. Via cPanel File Manager or SFTP

  2. Go to /public_html/ directory

  3. Before editing, it is always better idea to create a backup of .htaccess file so please, must do it right now; by creating a file with unique name e.g. ‘htaccess-backup-by-me’

  4. Now, edit .htaccess

  5. If you are using WordPress, you will see a file like this

  6. You need to place Force HTTPS rule just before any previous rewrite rules.

I hope this helps in editing .htaccess right way. Feel free to ask if you have any query.

1 Like

@alexisdeplanque this plugin may solve your redirect issue.

I’m in no way affiliated with that plugin, but it’s solved my redirect problems before when enabling the Cloudflare plugin :nerd_face:

1 Like