MongoDB not accessible form cloudflare DNS

I have a primary domain ( and created a staging website ( through the WHM of my primary domain. So i can share my Mongo DB with both primary and staging domains same time and the IP for both domains are same.

Its was working fine, but while i moved the staging website in to Cloudflare DNS. Im not able to load to the Mongo DB from my primary domain.

Im using A record to connect primary domain. IP.

Im not able to access mongo db.

also came to know that while i changed the A record from PROXIED to DNS Only.
I can access the MongoDB from my staging website.

As you’ve discovered, Cloudflare does not proxy database connections. That’s why I configure my sites to either use ‘localhost’ if it’s on the same machine, or the IP address of the database server.

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