Support » Plugin: Wordfence Security - Firewall & Malware Scan » StackPath and Wordfence

  • Resolved Akhil K A


    Hello there!

    On my new site, and I’m using StackPath for WAF and CDN.

    The problem I’m facing is WF is not getting the IP of the user. Then I searched on the internet and I found this topic:

    So, I set it as “Use the X-Forwarded-For HTTP header.”, and added the “trusted proxies” list from StackPath.

    But still, WF is getting the IP of StackPath.

    Then I thought this is an issue of hosting provider, so I contact SiteGround and they investigated the issue.

    They confirmed to me that the site is getting the X-Forwarded IP (They created a custom PHP file and showed me the proof that the site is getting the X-Forwarded IP)

    So, SiteGround recommended me to contact WF support.

    Any solution? If this issue can be fixed, I can upgrade to WF Premium.


Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support WFAdam


    Hello @hiakhil and thanks for reaching out to us!

    Have you tried the other IP detection options, just to test? Go to Wordfence > All Options > General Wordfence Options > How does Wordfence get IPs and reference the area under that section that says Detected IPs and Your IP with this setting. Start from the top and check to see if any of the settings show that both of those show the same IP as the site above does.

    If you’re using Cloudflare, you will most likely need to select “Use the Cloudflare “CF-Connecting-IP” HTTP header to get a visitor IP. Only use if you’re using Cloudflare.”.

    If this doesn’t help, could you send a screenshot of this section to me, so I can view it. Email to wftest @ wordfence . com and make sure the subject is your forum username.

    Let me know if this helped or when you send the screenshot over!


    Akhil K A


    Hello there!

    I tried all the IP detection methods, and none of them detected my real IP.

    As I mentioned, I’m using StackPath, not CloudFlare.

    I’ll send you the screenshots now.


    Plugin Support WFAdam


    Thanks @hiakhil for sending those over.

    Are you sure you have all the correct proxies trusted?

    To add all of StackPath’s IP address ranges as trusted proxies.

    Click on the link + Edit trusted proxies

    Now you will need to enter all of these StackPath IP address ranges shown in the page below under the CDN/WAF IP Blocks section:

    Each IP address range must be manually copied and pasted on a separate line in the Trusted Proxies text area in Wordfence.

    Make sure you copy this list that you have created in the Trusted Proxies text area in case you get blocked when your press the SAVE CHANGES button otherwise you will have to go through that lengthy process again. You may be blocked if Wordfence is seeing all IP addresses as StackPath IP addresses and an attacker is blocked but Wordfence sees you as having the same IP address as the attacker.

    Once saved you should then see your IP address on the line Your IP with this setting.

    I would just review your trusted proxies again to ensure we got all the correct ones in there. Let me know if this helps at all.


Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.