1and1 and Cloudflare Too Many Redirects Error


#1

I am using 1and1 as an “optimized partner” with Cloudflare. We are able to get the site pointing to Cloudflare, but every time it does, the browser is throwing a “Too Many Redirects Error”.

If it matters…this is the redirect code that I am using;
RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://www.mysite.com/$1 [R=301,L]

Any ideas??? 1and1 can’t figure it out.


#2

I wouldn’t use a Port 80 redirect on the server. Use “Always Use HTTPS” in Cloudflare’s Crypto tab.


#3

Thanks for the reply, but I am not using the Cloudflare Control Panel. Since this is through an “optimpized partner” it goes through the 1and1 control panel. So all we really do is activate it, which displays the new CNAME for Cloudflare.

Do you think the Port 80 could be causing this error?

If so, what would be the proper redirect code?
Thanks


#4

Since I don’t know what options and settings an “optimized partner” uses, I’m stuck.

My theory is that Cloudflare is set to Flexible SSL, which uses HTTP to communicate with your server, but HTTPS for your visitors.

How about just turning off that redirect and see what happens?


#5

As it sits right now…1and1 has it pointing it to their servers, behind the scenes, while they look at the problem(been going on for over 3 months now).
So, it’s not as easy as me just erasing the redirect code. I have to contact them, spend an hour on the phone, watch the site go down again ect… I don’t have a problem doing this, but was hoping to find some assistance here that would give a better probability of getting this issue fixed, before wasting more time with their support.

I do have the option to change it to “Full SSL”…Is there any difference here?


#6

Full (or Strict) SSL requires that you have SSL set up on your server.

If you open a Support ticket, they would have a better idea of what’s going on. 1) They can test your origin server to see how it responds, and 2) They would know what Cloudflare options and features are available on your plan.


#7

Are you saying to open a Support Ticket with Cloudflare or 1and1?


#8

Cloudflare. Even the free accounts here have access to Support, though it may take up to a couple of days for them to close out your ticket.


#9

Thanks!
One more question… How can I be 100% sure that the site is being routed through Cloudflare? I can see that the CNAME has changed at gwhois, but this has happened before, and after an hour or two the redirect error would show.
Is there somewhere in Firefox or Chrome Developer tools that I can look upon page load that will show Cloudflare?


#10

Hi. You could inspect an image for the cf-cache-status & cf-ray response headers. This is one way of verifying Cloudflare status as images are cached by default:


#11

Hey great troubleshooting and orientation to confirm redirection is being perform properly here’s another code to confirm you are using the cloudflare servers but the sample from @andy should cover your concern but just in case here’s another tool to help you on your 1on1 issue. Good luck Is tuff being a CloudFlare Admin!! check your https settings too.

headermore