This site can’t provide a secure connection


Hi I have hosted my site with infinity free’s free web hosting and domain and I have also hosted one more site with it which is working fine but now when I hosted my new site I am getting the error (This site can’t provide a secure connection). I have tried different browsers and even tried after clearing my cache but I am still receiving the error. I did not face this error while the hosting of my previous site on infinity free. Please help me solve this issue.

Please install a SSL certificate first if you want to use HTTPS.


I currently dont want to use ssl. I will install ssl once I see the site is up. I tried accessing it from http too. I know that https will not work so I used http to access it. Can you try to access the site from your end and check it for me.

Yoru code is redirecting to https, please remove that.


how can I change that?

What script are you using?

I am using html & css

no backend

Share your htaccess code.

1 Like

ok wait

RewriteEngine On

RewriteCond %{HTTPS} off

RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

<IfModule mod_expires.c>
  ExpiresActive on
  ExpiresDefault "access plus 1 month"
  ExpiresByType text/html "access plus 7 days"
  ExpiresByType text/css "access plus 7 days"
  ExpiresByType text/php "access plus 7 days"
  ExpiresByType text/js "access plus 14 days"
  ExpiresByType text/javascript "access plus 14 days"
  ExpiresByType application/javascript "access plus 14 days" 
  ExpiresByType image/gif "access plus 12 months"
  ExpiresByType image/jpeg "access plus 12 months"
  ExpiresByType image/png "access plus 12 months"
  ExpiresByType image/webp "access plus 12 months"
  ExpiresByType image/x-icon "access plus 12 months"
  ExpiresByType application/x-icon "access plus 12  months"
  ExpiresByType application/rss+xml "access plus 1 hour"
  ExpiresByType application/atom+xml "access plus 1 hour"

this is the ht access code of the htaccess that I made inside my htdocs folder.

Remove this.

1 Like

ok wait let me try this

Ok so this worked to remove the error but now after entering the url I am not getting to see my page directly. It is showing me the different directories I have. You can see this in the picture below.

Please solve this issue now.

You need an index file (index.php or index.html).

You have to solve the issue. We have the right to not help you at all, and If we choose to not help you, you will have to learn for yourself.


sorry I was not trying to be rude. I am sorry if I sounded rude to you. And I have a index.php file

It doesn’t look like you have an index.php file in your root directory. You have one in the ResponsiveBlogTemplate folder. You can move the files from that directory to the root or set up a htaccess redirect.

1 Like

how can I set up a htaccess redirect?

and yes I am facing one more issue and that is when I go in the responsiveblogtemplate folder through my domain name then it shows my home page which is fine but I am not able to access my other pages through the navigation bar. It shows and 404 error and redirects me to infinityfree 404 page.