Why can't I acces my website through its ip address after setting up CloudFlare?

Posted April 29, 2018 6.4k views
NetworkingUbuntu 16.04CDN

I was able to access my website by putting the ip address of my droplet to the web browser. Some time ago I started using cloudflare CDN. Now I am not able to access my website with its ip. I only can visit by using my domain name.

I know that the point of using CloudFlare is not accessing the server directly through IP address. But I couldn’t get how CloudFlare can block access through droplet’s own ip address. I only pointed my domain name to their nameserver and give them my droplet ip.

Thanks in advance.

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
2 answers

Setting up CloudFlare alone will not have any effect on attempts to connect to your droplet directly. I run several sites using CloudFlare and more than once have mixed up IP addresses between the one that the domain resolves to (cloudflare proxy) and the one issued in the DO control panel.

Unless you have configured a firewall on your droplet to block traffic coming from elsewhere your web service should be available (even if it doesn’t display a site) when accessing your droplet in a browser with it’s IP.

  • Dear Ryan,

    Many thanks for your reply.

    I guess one of the third party software I set up has changed configuration of the firewall. As you said it looks impossible for CloudFlare to block access to Droplet IP.

When the site is served via cloudflare, you’ll need to use CloudFlares IP to access the domain. You can do a dns lookup and find the updated IP address of your domain. A site cannot function without an IP address.