Unable to connect to website using domain, but can access using public IP

I have added cloudflare nameservers on my domain provider (Hostinger) and my Application web server Public IP (from AWS EC2 instance) on the A record also on cloudflare. But I’m still not able to access my website using the domain name. I have checked AWS instance, all ports are open to all IPs, no firewall block or anything.
I can access the instance / my website on that public IP, but I don’t understand why Cloudflare is not able to connect to that public IP (the one I entered in DNS - A record on cloudflare)

Can anyone please suggest any help here? Shall I share the public IP of my AWS hosted website ?

If you can further describe the issue (e.g. screenshots, error codes) then we might be able to assist further.

Is your website has a valid HTTPS configuration (SSL cert installed)?

On checking the domain, it shows Error 521

Web server is down - Webserver down

My website runs on http. I have configured the port correctly n nginx , therefore I’m able to access the website working totally fine on it’s public IP.

I don’t have SSL, therefore using cloudflare.

Error 521

Web server is down

This error comes up on checking the domain- humblebee.live

So this basically means it’s not getting any response from the web server!! But How come I am able to access it using the public IP ? It seems like it’s not pointing to the right web server either , because the request getting blocked is not possible because the http ports are opened for all ::/0

You still need a valid SSL certificate to be installed in your server to ensure full encryption between browser - Cloudflare - server.

Cloudflare does provide Origin Certificate for free, you can generate it and install it in your server, then open port 443 in your firewall or security group or ACL.

1 Like

Thanks a lot @erictung :smiley: :pray: I also had to make some additional changes on the nginx configuration alongwith this that you have shared. THANKS :slight_smile:

1 Like

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