Working IP from AWS EC2 not working through cloudflare (basic setup)

I feel like I have the most common setup on Cloudflare, yet, I can’t get this to work.

I have an EC2 hosted webserver: 13.56.18.7
I have a GoDaddy domain: alkouri.com

I changed my nameservers on go daddy to the ones provided by cloudfront
I added the following DNS records:

  1. A alkouri.com 13.56.18.7
  2. A www 13.56.18.7
    (also have an MX record and TXT record but don’t think those will cause any harm)

I ran a dig / trace and I see the nameservers here:

Going directly to the IP will pop up with the webpage no problem.

what am I doing wrong?

You don’t have HTTPS enabled on your server (https://13.56.18.7). Currently, Cloudflare tries to reach your server on port 443 (https) which refuses the connection. You need to either enable HTTPS on your server or change your SSL setting to Flexible, instead of the default “Full”.

Also…

2 Likes

So I am fine with not being secure, as long as my site doesn’t say I am insecure.

Also, I tried using flexible and it didn’t work, which is why I set it to full in the first place.

I just set it back to flexible and I am getting the same error.

That isn’t the best strategy and I won’t recommend it, you are basically lying to your users.


The server works on port 80 just fine, port 443 isn’t even open. On Flexible it should work and it does for me at the moment.

2 Likes

Besides what @matteo said, you should also link your static assets like images, scripts, and styles through https://, as mixed content (http/https mix) will cause the browser to flag the page as insecure, and use your domain name instead of the IP if you don’t want to leak your IP address.

1 Like

Yeah, I was going one step at a time, but that is the main problem with the actual page.

1 Like

I figured it out! Had to change out the IP for my domain.

All working, thanks gentlemen.

And believe me, I understand that my site is insecure, but this is just an informational website, plain text communication is ok really in this situation.

Oh, no it isn’t. It can still put your visitors at risk.

1 Like

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