'Page isn't redirecting properly' errors on wp-admin


I’ve got two sites on different Cloudflare accounts which both have similar issues, which appear to have happened despite me having changed nothing - they just suddenly broke. It looks like they are probably related to https and reatelimiting for which I use Cloudflare.

The first one bntmedia.co.uk i get “Page isn’t redirecting properly” errors on wp-admin (its a wordpress site) and on wp-login page I get RATELIMITED “Too many requests - try again in 59 seconds” errors. It’s similar on the other site which is the most recent one to break, but the problems on wp-admin also appear on the actual site.

Changing the URL of the wordpress install to remove the https and revert to http seems to work. I’ve been working with my hosting company who set up a testing site which doesn’t use https or go through Cloudflare - everything is identical, except the URL and that works fine, so it looks like its an issue with https side on Cloudflare that might be causing the problems.

I’ve changed no settings really on Cloudflare for either of these sites. I have flexible SSL enabled, Automatic SSL rewrites enabled, two page rules: http://bntmedia.co.uk/ - Always Use HTTPS and bntmedia.co.uk/wp-admin - Disable Performance, and thats more or less it - nothings really been changed for months.

Any ideas if the issue due to Cloudflare setup, and how I can get this fixed. I have Cloudflare’s plugin installed on both, but with these errors I can’t login to wordpress at all.

Seems you are suffering a https redirect loop which is related to using technology, here Wordpress.
please check this out.

First thing, make sure that at WordPress General settings, you have HTTPS version URL, not HTTP.

You can verify once by checking MySQL database table. If there is HTTP, you may change to HTTPS.

Or if you need very fast solution, simply define HTTPS version URL via wp-config.php

define('FORCE_SSL_ADMIN', true);
// in some setups HTTP_X_FORWARDED_PROTO might contain 
// a comma-separated list e.g. http,https
// so check for https existence
if (strpos($_SERVER['HTTP_X_FORWARDED_PROTO'], 'https') !== false)

 /* That's all, stop editing! Happy blogging. */

Then try to access, it should work. If it works, better, at last you can use Search/Replace to fix.

Also, one more thing. Make sure you don’t have vice-versa redirection in the .htaccess


  1. https://codex.wordpress.org/Changing_The_Site_URL
  2. https://codex.wordpress.org/Administration_Over_SSL

This plugin may also help.

1 Like

Thanks Zaq, Anonymous and Andy for your replies. All have been really helpful. Looks like I might use your code Anonymous (just need to consult the guy at my hosting company whos supporting me with this before I implement) and Andy I have already installed that plugin on another site which doesn’t have these problems following your suggestion.


You’re welcome!

1 Like

AnonymousKumar - you saved my bacon! I altered Wordpress site including W3 Total Cache; the entire site would not load, "Page isn’t redirecting properly”. Added the code, and back on - thanks.

1 Like

Thank you for this. This worked wonders!!!

I am glad to know, You’re most welcome! :slight_smile:

This really helped me out

1 Like