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.
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!
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.
Click below to sign up and get $200 of credit to try our products over 60 days!
Enter your email to get $200 in credit for your first 60 days with DigitalOcean.
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.
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.