Site can't connect over https

Hi, my domain name registra is namecheap and i am deploying on digitalocean. I recently connected my domain name to Cloudflare so that i could have ssl protection.
I thought I set up my site to use Cloudflare. I wanted to use it to get SSL certs working. I updated my nameservers to the ones provided, but now I am getting

This site can’t be reached refused to connect.



when I try to visit . http still works here though. What am I doing wrong?


Generally, that is a propagation issue. But the actual issue is that your server is not configured for HTTPS. You definitely need to do that in order to have a secure site.

my server is nginx. Since i am not the provider of the certificat what do i have to do to configure https on nginx.

Thank you

You need to configure your webserver to properly respond on port 443 and you need to configure a valid certificate. That could be, for example, a Cloudflare Origin certificate.

Then make sure your SSL mode is “Full strict”.

SO what i have to do is to create a Cloudflare origin certificate for my domain and then configure my server for using the origin certificate?

That is one option. You need a publicly valid certificate, that can be an Origin certificate or any other (e.g. LetsEncrypt).

Thank you Sir. I will try that

After doing what you asked me, i can now access https but i am told my sertificate is invalid from Cloudflare

Which of these numbers does your server IP address end with?


it ends with 203

The certificate is correctly in place, but only trusted by Cloudflare’s proxies. This leads us back to what I mentioned earlier, that you have a propagation issue. Simply wait a few hours until your resolver updates.

Also, your HTTPS redirect seems to be broken on your server. You should fix that.

Thank you very much for your time but is the propagation issue caused by a miss configuration i have done?

And I chose the option on Cloudflare to automatically redirect http to https but it doesnt not seem to work

Propagation is something you dont really have control over. You need to wait until your DNS resolver updates the value.

The redirect on Cloudflare works, the issue is on your server, where you also redirect, but the redirect is incorrectly configured.

should the redirect on the server be removed? since that of Cloudflare is already working

As long as you keep your site on Cloudflare you do not necessarily need to have it on your server too.

I have removed the origin certificate by Cloudflare and generated one with letsencript. all works well now. thank you sir

This topic was automatically closed after 30 days. New replies are no longer allowed.