Sign up ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

My raw access log is now filled with CloudFlare IP addresses. Is there any way I can use a .htacess file or configure the server to log the user's actual IP address?

With PHP, CloudFlare creates these environment variables for our reference, but I can't find anything similar for raw access logs.

Unfortunately, as suggested in this Stack Overflow question, using mod_cloudflare.c for the following is not an option on a shared hosting server:

share|improve this question

1 Answer 1

We have solutions for restoring original visitor IP with CloudFlare in our knowledge base.

share|improve this answer
Bad answer with an inaccessible link –  Novocaine Sep 4 at 9:35
That link loads fine for me. In addition, the server logs can only be addressed by one of the solutions in the link. Try again. –  damoncloudflare Sep 5 at 3:37
Actually see the issue(there is a weird redirect on that URL). The solutions are outlined at:… –  damoncloudflare Sep 5 at 3:40
Yeah, link didn't work for me either, but I've edited the post with your updated one, thanks Damon. –  Simon East Sep 10 at 7:00
The OP already tried mod_cloudflare but can't use it on shared hosting. Unfortunately this doesn't actually answer the question of how to get these in that case. –  Andrew Lott Sep 10 at 8:18

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.