Title: Proxy header
Last modified: September 18, 2020

---

# Proxy header

 *  Resolved [groovice](https://wordpress.org/support/users/groovice/)
 * (@groovice)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/proxy-header-2/)
 * Hello,
    I want to know about the “**Proxy header**“.
 *     ```
       HTTP_X_FORWARDED_FOR
       HTTP_CF_CONNECTING_IP
       ```
   
 * I am getting these two warnings in my diagnostic tab. what they are and why I
   am getting this warning? and how to fix it? I mean what I have to do that the
   proxy header? Do I just have to enable it? or something like that? please guide
   me. thanks
 * reference: [https://imgur.com/VhuEsEn](https://imgur.com/VhuEsEn)

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Plugin Author [Thomas](https://wordpress.org/support/users/tsteur/)
 * (@tsteur)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/proxy-header-2/#post-13430951)
 * Hi [@groovice](https://wordpress.org/support/users/groovice/)
 * I’ve created an FAQ describing what needs to be done to fix this issue. Could
   you let me know if this was helpful or if anything is unclear? [https://matomo.org/faq/wordpress/how-do-i-fix-the-proxy-header-warning-in-the-matomo-for-wordpress-system-report/](https://matomo.org/faq/wordpress/how-do-i-fix-the-proxy-header-warning-in-the-matomo-for-wordpress-system-report/)
 * Thanks,
    Thomas
 *  Thread Starter [groovice](https://wordpress.org/support/users/groovice/)
 * (@groovice)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/proxy-header-2/#post-13431045)
 * **This is as simple as that.** and I waste many days to fix this issue and still
   can’t figure out.
 * Your guide works perfectly, I just change the IP header to **REMOTE_ADDR** to**
   HTTP_X_FORWARDED_FOR** and the error message gone. as you mentioned in your guide“
   If multiple options show your IP address, **it’s likely to fine to choose any
   of them**.”
 * > [View post on imgur.com](https://imgur.com/xp1XMSq)
 * ………………………….
    Yesterday I did something to fix this issue by Restoring the visitor’s
   real IP addresses ( Cloudflare ).
 * I have retrieved the visitor’s originating IP address in the HTTP header from
   [all Cloudflare’s IP addresses.](https://www.cloudflare.com/ips/)
 * I have Added these following lines in my **/etc/nginx-rc/main-extra.conf** file.
 *     ```
       set_real_ip_from 103.21.244.0/22;
       set_real_ip_from 103.22.200.0/22;
       set_real_ip_from 103.31.4.0/22;
       set_real_ip_from 104.16.0.0/12;
       set_real_ip_from 108.162.192.0/18;
       set_real_ip_from 131.0.72.0/22;
       set_real_ip_from 141.101.64.0/18;
       set_real_ip_from 162.158.0.0/15;
       set_real_ip_from 172.64.0.0/13;
       set_real_ip_from 173.245.48.0/20;
       set_real_ip_from 188.114.96.0/20;
       set_real_ip_from 190.93.240.0/20;
       set_real_ip_from 197.234.240.0/22;
       set_real_ip_from 198.41.128.0/17;
       set_real_ip_from 199.27.128.0/21;
       set_real_ip_from 2400:cb00::/32;
       set_real_ip_from 2606:4700::/32;
       set_real_ip_from 2803:f800::/32;
       set_real_ip_from 2405:b500::/32;
       set_real_ip_from 2405:8100::/32;
       set_real_ip_from 2c0f:f248::/32;
       set_real_ip_from 2a06:98c0::/29;
       real_ip_header X-Forwarded-For;
       ```
   
 * after that, the location is working properly.
 * can you please tell me, I have to delete these lines or not? or are they just
   fine?
 *  Plugin Author [Thomas](https://wordpress.org/support/users/tsteur/)
 * (@tsteur)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/proxy-header-2/#post-13431317)
 * Hi [@groovice](https://wordpress.org/support/users/groovice/) unfortunately I’m
   not so familiar with nginx so it’s hard to tell for me but if you didn’t need
   this before, I would remove them again.
 *  Thread Starter [groovice](https://wordpress.org/support/users/groovice/)
 * (@groovice)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/proxy-header-2/#post-13431342)
 * thank you, Thomas, for your help. now the location is working perfectly.
    but
   I find an issue with other devices like ( android, IOS ) devices are not detecting.
   only windows and mac IPs are detecting. is there any fix for this as well?
 * I find this on your blog: [https://imgur.com/i4jdBbI](https://imgur.com/i4jdBbI)
   
   can you explain to me a little bit? I am using Cloudflare atm.
 *  Plugin Author [Thomas](https://wordpress.org/support/users/tsteur/)
 * (@tsteur)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/proxy-header-2/#post-13431393)
 * I haven’t really used Cloudflare before but I’m thinking what needs to be done
   there is something like this which you find in “Page Rules” in Cloudflare
 * > [View post on imgur.com](https://imgur.com/a/Eqiy1Fj)
 * I can’t promise thought that this fixes the issue.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Proxy header’ is closed to new replies.

 * ![](https://ps.w.org/matomo/assets/icon-256x256.png?rev=2309115)
 * [Matomo Analytics - Powerful, Privacy-First Insights for WordPress](https://wordpress.org/plugins/matomo/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/matomo/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/matomo/)
 * [Active Topics](https://wordpress.org/support/plugin/matomo/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/matomo/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/matomo/reviews/)

 * 5 replies
 * 2 participants
 * Last reply from: [Thomas](https://wordpress.org/support/users/tsteur/)
 * Last activity: [5 years, 7 months ago](https://wordpress.org/support/topic/proxy-header-2/#post-13431393)
 * Status: resolved