Switching Nameservers to Cloudflare causes Redirection problems

hi there,

The problem is that my index page redirects too many times when i switch my nameservers to point at cloudflare. (i’m using cloudflare’s DNS). I see this error message from Chrome (and a similar one from Firefox)

This page isn’t working

**a1-typing-services tld ** redirected you too many times.

I know from previous experience, that clearing cookies and caches does not fix the problem.
When my nameservers point at clouDNS dot net, i see no problems. I am using nginx to redirect port 80 traffic to port 443 for HTTPS. I added a forward slash to the end of the redirect string so that I could see how many times the redirection was happening. like so:

return 301 //$host$request_uri/ # (notice the / at the end of the string)

The URL bar in the browser then looks like this:
//a1-typing-services. suffix /////////// (notice the forward slashes)

No code changes were made on my side. The only change, was switching my nameservers to point to cloudflare. The DNS was previously performed at clouDNS, it’s now being performed by cloudflare. This problem started a few days ago. I spent a lot of time fruitlessly looking in my own code and config. The problem went away when i switched my DNS to clouDNS. Today i switched back to Cloudflare to see if the problem would re-appear in the absence of changes on my side. And It has. My question is: What on earth could be causing this problem ?

Thanks to whosoever offers advice/suggestions/solutions
Have a nice day :slight_smile:

It’s the SSL configuration. Would you try setting your SSL to Full Strict? For more info on the error & fix, check the following Tutorial

2 Likes

Thank you for your kind suggestions and help.
Very helpful of you :slight_smile:

I have taken the time and trouble to set up SSL for myself using nginx.
I wonder if, setting cloudflare’s SSL setting to full(strict), will mean that
I then have two sets of encryption occurring:
(1) as i have configured it using nginx
(2) as provided by cloudflare

Thank you again for your help. Much appreciated :slight_smile:
Rob.

1 Like

It’ll be simply mean to say that your origin traffic will be encrypted. More info here:

1 Like

There are two distinct connections to encrypt when you use Cloudflare: one from your visitor to Cloudflare and another from Cloudflare to your origin server.

3 Likes

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