Why do my server logs show Cloudflare's IPs using Cloudflare?

When your website traffic is routed through the Cloudflare network, we act as a reverse proxy. This allows Cloudflare to speed up page load time by routing packets more efficiently and caching static resources (images, JavaScript, CSS, etc.). As a result, your origin web server sees Cloudflare IP addresses by default when responding to and logging requests.

Cloudflare reports the actual visitor IP address in an appended HTTP header called CF-Connecting-IP. However at times when you have other applications that depend on the incoming IP address of the original visitor, certain problems might arise.

To address this issue, you can log real visitor IPs with mod_cloudflare in your origin web server.  

The diagram below outlines the different ways that IP addresses are handled with and without Cloudflare.  Also, consult these articles for restoring original visitor IPs in specific web servers and CMS platforms.

mod_cloudflare.png


Still not finding what you need?

The Cloudflare team is here to help. 95% of questions can be answered using the search tool, but if you can’t find what you need, submit a support request.

Powered by Zendesk