Question

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

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.


Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

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.

Accepted Answer

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

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.