• You MUST read the Babiato Rules before making your first post otherwise you may get permanent warning points or a permanent Ban.

    Our resources on Babiato Forum are CLEAN and SAFE. So you can use them for development and testing purposes. If your are on Windows and have an antivirus that alerts you about a possible infection: Know it's a false positive because all scripts are double checked by our experts. We advise you to add Babiato to trusted sites/sources or disable your antivirus momentarily while downloading a resource. "Enjoy your presence on Babiato"

Wordpress "redirected too many times" problem but only homepage url

kakoo

duplicate of @Pdnew, @parijha, @oldeone, @dreckson
Banned User
Nov 11, 2020
60
17
8
hello everyone i recently migrated my website from one host to another host (ionos to plesk vps), using all in one migration plugin website migrated successfully but the website homepage URL showing "too many redirect" the problem is the only homepage url is not working specficaly but all my website pages, url, posts and wordpress dashboard loading correctly.

I am using cloudflare for dns & ssl, elementor, woocommerce etc in my website, When I shift my website back to old IP (host), the website works but in new host website homepage url not working.

the website only works when i disable the cloudflare proxy so that means the problem is coming from the cloudflare

fix i try:

Changing the site url
Changing cloudflare ssl mode to full, flexible and full strict
creating default htaccess file
i try to open website in incoginito mide and another device
disabling the plugins ets (but nothing working for me)

If anyone can help me with this it would be greatly appreciated
 
check both your htaccess and php.ini files for embedded redirects from the old ionos hosting system.
I've found that many many managed wordpress hosts embed commands relative ot only their hosting into those files; causes no end of issues.
Also check and ensure that any MU plugins (Must Use) from previous hosts have been removed by your new host.
Hope this helps!~!
 
check both your htaccess and php.ini files for embedded redirects from the old ionos hosting system.
I've found that many many managed wordpress hosts embed commands relative ot only their hosting into those files; causes no end of issues.
Also check and ensure that any MU plugins (Must Use) from previous hosts have been removed by your new host.
Hope this helps!~!
thanks for suggestion bro but i already done this
 
Try insert this in to wp-config.php:
if ((isset($_ENV["HTTPS"]) && ("on" == $_ENV["HTTPS"]))
|| (isset($_SERVER["HTTP_X_FORWARDED_SSL"]) && (strpos($_SERVER["HTTP_X_FORWARDED_SSL"], "1") !== false))
|| (isset($_SERVER["HTTP_X_FORWARDED_SSL"]) && (strpos($_SERVER["HTTP_X_FORWARDED_SSL"], "on") !== false))
|| (isset($_SERVER["HTTP_CF_VISITOR"]) && (strpos($_SERVER["HTTP_CF_VISITOR"], "https") !== false))
|| (isset($_SERVER["HTTP_CLOUDFRONT_FORWARDED_PROTO"]) && (strpos($_SERVER["HTTP_CLOUDFRONT_FORWARDED_PROTO"], "https") !== false))
|| (isset($_SERVER["HTTP_X_FORWARDED_PROTO"]) && (strpos($_SERVER["HTTP_X_FORWARDED_PROTO"], "https") !== false))
|| (isset($_SERVER["HTTP_X_PROTO"]) && (strpos($_SERVER["HTTP_X_PROTO"], "SSL") !== false))
) {
$_SERVER["HTTPS"] = "on";
}

Then restart webserver when it needed.
 
Last edited:
Try so DM me my guy I have had the same problem way back.
 
Try insert this in to wp-config.php:
if ((isset($_ENV["HTTPS"]) && ("on" == $_ENV["HTTPS"]))
|| (isset($_SERVER["HTTP_X_FORWARDED_SSL"]) && (strpos($_SERVER["HTTP_X_FORWARDED_SSL"], "1") !== false))
|| (isset($_SERVER["HTTP_X_FORWARDED_SSL"]) && (strpos($_SERVER["HTTP_X_FORWARDED_SSL"], "on") !== false))
|| (isset($_SERVER["HTTP_CF_VISITOR"]) && (strpos($_SERVER["HTTP_CF_VISITOR"], "https") !== false))
|| (isset($_SERVER["HTTP_CLOUDFRONT_FORWARDED_PROTO"]) && (strpos($_SERVER["HTTP_CLOUDFRONT_FORWARDED_PROTO"], "https") !== false))
|| (isset($_SERVER["HTTP_X_FORWARDED_PROTO"]) && (strpos($_SERVER["HTTP_X_FORWARDED_PROTO"], "https") !== false))
|| (isset($_SERVER["HTTP_X_PROTO"]) && (strpos($_SERVER["HTTP_X_PROTO"], "SSL") !== false))
) {
$_SERVER["HTTPS"] = "on";
}

Then restart webserver when it needed.
thanks but this also not working for me, i finally tired and didn't find any solution of this problem so i turned off the cloudflare proxy and now i am using let's encrypt certificate for https Which we can install for free from plesk panel, the only problem is that now I am not able to take advantage of cloadflare's feature.
 
I've Had It Before And I Do It And Clear Browser Cache , Plugin Cache If Yes And Enable Developer Mode In Cloudflare
yep ryt, I had the same problem before with my other sites but at that time changing the site url and changing ssl mode used to fix but this time nothing is understandable, only homepage url (example.com) shows redirect loop and others URLs works like wordpress login post url etc.
 
if still relevant

this code snippet on begging of wp-config.php will make it.
Make sure to include https:// or http:// based on your domain / setup.
Also if using any form of cache - clear them after the change.

The setup bellow force wordpress to home and site url as defined overiding any plugin changing.

Code:
cat sites/localhost/html/wp-config.php
<?php
define( 'WP_CACHE', true );
define('FS_METHOD', 'direct');
define('WP_HOME','https://yourwebsite.com');
define('WP_SITEURL','https://yourwebsite.com');

Hope it helps
 
define('WP_HOME','https://yourwebsite.com');
define('WP_SITEURL','https://yourwebsite.com');

In wp-config.php
 
  • Like
Reactions: kakoo
check both your htaccess and php.ini files for embedded redirects from the old ionos hosting system.
I've found that many many managed wordpress hosts embed commands relative ot only their hosting into those files; causes no end of issues.
Also check and ensure that any MU plugins (Must Use) from previous hosts have been removed by your new host.
Hope this helps!~!

True. Managed hosts suck.
 
AdBlock Detected

We get it, advertisements are annoying!

However in order to keep our huge array of resources free of charge we need to generate income from ads so to use the site you will need to turn off your adblocker.

If you'd like to have an ad free experience you can become a Babiato Lover by donating as little as $5 per month. Click on the Donate menu tab for more info.

I've Disabled AdBlock