Redirect http/s to www having random redirect errors


I switched to https about 2 weeks ago. Initially everything went well. But redirect errors keep popping up and I just can’t find out why?!

Firstly the SSL is with CF. It’s working.

I enabled Always use HTTPS.

I have a page rule caching all for 4 hours.

My domain should be

I have a sub domain

The problem:
People are telling me they are getting occasional “this page isn’t redirecting properly” error on
I’ve seen it happen randomly. I’ve cleared the cache and it’s working again.

This morning on mobile I tried and there was a “this page isn’t redirecting properly” error.

I then typed in and it redirected to I don’t understand why it did not redirect to

Google analytics then sent me a message saying they are getting hits from different versions of my site etc

If I enter in or into any desktop browser it resolves nicely into But on this mobile browser it’s not …

Further, on Cloudflare analytics I’m getting 11% of “empty”.

My Htaccess (I thought cloudflare “always use https” bypassed this) before switching to https was this:

RewriteEngine On
RewriteCond %{HTTP_HOST} ^$ [NC]
RewriteRule ^(.*)$$1 [R=301,L]

My Htaccess after switching to https is this

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

I’m really bashing my head on this one. Any insight on how to solve this would be greatly appreciated!


I’m now trying a page rule with* >forward 301 >$1 ) it seems to be working but I don’t know if this is the best option.


Hi there,

Have you solved the problem?


Yep, this is what fixed it.


I have the same problem which has a huge impact for users. This is unacceptable. I disabled cloudflare. Trying to solve the problem.


Did you try this?


I’m using https only for a subdomain, so i can’t try putting “www” in the beginning of subdomain.
It randomly stucks in a redirect loop, furthermore, i’m using cloudflare only for firewall and cdn. I already have https issued for that subdomain and already set it up on cpanel.