When using a WordPress website with Cloudflare, some users may encounter an error indicating that the website is redirecting too many times. This issue often arises due to the setup of SSL certificates. Specifically, when Cloudflare provides an SSL certificate for the website, but the root website itself lacks an SSL certificate, a conflict occurs. In cases where the local website doesn’t have SSL, its local database is updated with HTTP URLs. However, Cloudflare’s settings are configured to redirect to HTTPS, resulting in a loop that triggers the error message about excessive redirection.
for solution you can add these 3 definition’s and settings on wp-config.php
define(‘WP_HOME’,’https://yourwebsite.com’);
define(‘WP_SITEURL’,’https://yourwebsite.com’);
$_SERVER[‘HTTPS’] = ‘on’;
this make setting of your websites that can help you to resolve this issue