Website Fails to Load When Cloudflare is Used: ERR_TOO_MANY_REDIRECTS
Symptoms
A website behind Cloudflare shows the following error message in a web browser:
ERR_TOO_MANY_REDIRECTS
The page isn’t redirecting properly

When Cloudflare is disabled, the website loads fine.
The Permanent SEO-safe 301 redirect from HTTP to HTTPS setting is enabled in Plesk at Domains > example.com > Hosting Settings, or custom HTTPS redirection is configured in the domain's .htaccess
file.
Additionally, trying to issue a Let's Encrypt certificate for the domain fails with the following error:
Invalid response from https://acme-v02.api.letsencrypt.org/acme/authz-v3/11481922061.
Details:
Type: urn:ietf:params:acme:error:connection
Status: 400
Detail: Fetching /.well-known/acme-challenge/UcTI6ov0Pc3Fn2IRnNUiFKZKzBu5NaAy4IoscLbYh_I: Redirect loop detected
Errors like the following appear in the /var/log/plesk/panel.log
:
[2024-10-02 15:49:29.258] 25266:66fd4f4eab0c0 ERR [extension/sslit] Unable to renew domain example.com certificate automatically Invalid response from https://acme-v02.api.letsencrypt.org/acme/authz-v3/410952962857.
Detail: Fetching https://example.com/.well-known/acme-challenge/MBAnSZPyIqayq0YRyAZZ-_5b-JJxWq2b64h7kEZtzCg: Redirect loop detected
Cause
The SSL/TLS encryption mode is set to Flexible on the Cloudflare dashboard for this domain. This prevents proper access to the website files via HTTP.
Note: The SSL/TLS encryption mode for any domains using Cloudflare nameservers should always be set to Full (strict) when their website content resides on a Plesk server. This ensures that only the SSL certificate installed on the Plesk server is used.
First Resolution
- Log into your Cloudflare.com account.
- Go to example.com > SSL/TLS and change the SSL mode to Full (strict).
Second Resolution - If you don't have any access to Cloudflare.
You may turn off The "Permanent SEO-safe 301 redirect from HTTP to HTTPS" setting in Plesk at Domains > example.com > Hosting Settings