Subdomain, SSL handshake failed or ERR_TOO_MANY_REDIRECTS

Username (e.g. epiz_XXX) or Website URL


Error Message

Error 525, SSL handshake failed

Other Information

I’m using Cloudflare SSL/TLS Full encryption mode with a subdomain beside my main domain

The main domain is Flutter, subdomain is HTML tailwind
both have the same htaccess code

// forcing all urls to https
RewriteEngine On
RewriteCond %{HTTP:X-Forwarded-Proto} =http
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

// redirecing of flutter
<IfModule mod_rewrite.c>
Options +FollowSymlinks
   RewriteEngine on
   RewriteCond %{REQUEST_FILENAME} !-d
   RewriteCond %{REQUEST_FILENAME} !-f
   RewriteRule . /index.html [L]

Also, I tried to use Flexible SSL/TLS it did make the subdomain works but the main domain shows ERR_TOO_MANY_REDIRECTS.

Also, I added DNS on cloudflare
type: A, IP: the main IP of the account on infinityfree

subdomain didn’t appear in infinityfree client area yet

Make sure that SSL seetings in cloudflare are set to FLEXIBLE. You can create an SSL from the client area and then upload the certificate. Btw, you might be curious why am I telling this.

If you set to FULL it needs a root certificate installed, which is a far lengthy process.

1 Like

And as for your second question, did you reate the subdomain in the control panel? It should be created in the control panel as well as in cloudflare.

1 Like

If you are using Full mode, you need to have an SSL certificate installed. This can be a self signed certificate. You can get it with our Free SSL Certificates tool and it requires very little effort to set up.

No, you do not. This is only necessary for “Full (strict)”. Any certificate, including a self signed one, is fine for “Full” mode.

And “Flexible” mode comes with it’s own set of issues.


Thanks, Jaikrishna.t <3

1 Like

Thanks, Admin <3, I did install it in infinityfree control panel >> SSL/TLS, is there is any other step supposed to do?


you have a problem in your .htaccess because multiple

RewriteEngine on

only once this line can be used

every time you use it the server quits everything it did and starts all over again


Thanks you <3, I just commentet the 3 line in the beginning, as cloudflare already forcing https too


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.