I have two websites somewebsite.com and anotherwebsite.com on Cloudflare in the same hosting service. In the first website, ($_SERVER[‘REMOTE_ADDR’] returns the original IP. But in the second website it is not. What can be a reason?
You’ve probably got the Proxy on for one and DNS Only for the other one.
You might also have enabled mod_remoteip (or similar) on one Origin server but not on the other.
Ideally, you would enable mod_remoteip on both Origin servers: