$_server['remote_addr']

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 :orange: Proxy on for one and :grey: 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:

https://support.cloudflare.com/hc/en-us/articles/200170786-Restoring-original-visitor-IPs#C5XWe97z77b3XZV