Articles in this section

A website hosted in Plesk fails to load when Cloudflare is used: ERR_TOO_MANY_REDIRECTS

Plesk for Windows Plesk for Linux kb: technical

Applicable to:

  • Plesk for Linux
  • Plesk for Windows

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 domain's .htaccess file.

  • Trying to issue a Let's Encrypt certificate for the example.com 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

  • Let's Encrypt SSL certificates cannot be issued or renewed, while errors that are similar to the following are visible in the /var/log/plesk/panel.log of the server:

    [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: 2001:db8:f61:a1ff:0:0:0:80: Fetching https://example.com/.well-known/acme-challenge/MBAnSZPyIqayq0YRyAZZ-_5b-JJxWq2b64h7kEZtzCg: Redirect loop detected
    [2024-10-02 15:49:29.321] 25266:66fd4f4eab0c0 ERR [extension/sslit] Failed to renew certificate of domain 'example.com': Invalid response from https://acme-v02.api.letsencrypt.org/acme/authz-v3/410952962857.
    Detail: 2001:db8:f61:a1ff:0:0:0:80: Fetching https://example.com/.well-known/acme-challenge/MBAnSZPyIqayq0YRyAZZ-_5b-JJxWq2b64h7kEZtzCg: Redirect loop detected
    [2024-10-03 01:49:18.034] 27924:66fddbedeee9a ERR [extension/letsencrypt] Domain validation failed for example.com: Invalid response from https://acme-v02.api.letsencrypt.org/acme/authz-v3/411128391227.
    Detail: 2001:db8:f61:a1ff:0:0:0:80: Fetching https://example.com/.well-known/acme-challenge/iopW2hUraCElpJY4bGhJLlmGLpOsXNRpdll4kO26_Tg: Redirect loop detected

Cause

The SSL/TLS encryption mode is set as Flexible on the end of Cloudflare for this domain and this prevents proper access to the website files via HTTP.

Note: In general, the SSL/TLS encryption mode for any domains that use Cloudflare nameservers should always be set to Full (strict) when their website content resides on a Plesk server, because that way only the SSL that is installed on the Plesk server is used.

Resolution

1. Log into your Cloudflare.com account

2. Go to example.com > SSL/TLS and change the SSL mode to Full (strict).

Alternatively disable Permanent SEO-safe 301 redirect from HTTP to HTTPS at Domains > example.com > Hosting Settings

Was this article helpful?

Comments

0 comments

Please sign in to leave a comment.