WP Cloudflare GeoIP Redirect
WP Cloudflare GeoIP Redirect
Description
WP Cloudflare GeoIP Redirect plugin enables you to setup redirect for users from selected countries to specific URL.
Geolocation is done using Cloudflare IP Geolocation data.
Redirection is done using the php header() function and you can choose Temporary Redirect (307) or Moved Permanently (301).
In order to use this plugin you need to setup Cloudflare for your website and enable Cloudflare IP Geolocation service. More info in FAQ.
Installation
- Upload the plugin files to the
/wp-content/plugins/wp-cloudflare-geoip-redirectdirectory, or install the plugin through the WordPress plugins screen directly. - Activate the plugin through the ‘Plugins’ screen in WordPress
- Use the CF Redirect>Options screen to configure the plugin
Screenshots
Faq
You don’t need CloudFlare account credentials for using plugin but you do need to have Cloudflare service active on your domain in order for plugin to get Geolocation user data and enabled Cloudflare IP Geolocation.
For info on how to configure Cloudflare IP Geolocation follow the link: https://support.cloudflare.com/hc/en-us/articles/200168236-Configuring-Cloudflare-IP-Geolocation
Frankly we don’t know yet. As of v1.3 new HTTP header is added when redirection is enabled (Cache-Control: no-cache, no-store, must-revalidate) but it’s on cache plugin to honor this setting
This issue is fixed by adding new rule to your .htaccess file before ## LITESPEED WP CACHE PLUGIN section
‘
RewriteEngine On
RewriteRule .* – [E=Cache-Control:vary=%{HTTP:CF-IPCountry}]
‘
You can read more about it here https://wordpress.org/support/topic/wp_redirect-not-working-with-litespeed-cache-on/#post-14280128
Reviews
Easy to Setup
By chtmtjutt on February 5, 2022
Thank you
By Richiard (nguyendungntd21) on December 14, 2021
The only and the best!
By delighter on April 22, 2021
it works perfectly!!
By Surname on April 6, 2021
Doesn't work
By somePaulo (finomeno) on January 22, 2021
Easy way to add country redirect if you are using Cloudflare services
By webinvaders on April 9, 2020
Changelog
1.4
- option to add custom Query string parameter name and value to current URL based on redirect settings
1.3
- fixed redirect loop issue when website url is same as redirect url
- added HTTP header “Cache-Control: no-cache, no-store, must-revalidate”
- after working with “LiteSpeed Cache” to fix the issues with redirect not working when caching is enabled workaround is added to FAQ
1.2
- changed redirect code to use “wp_redirect”
1.1
- Added CMB2 framework for plugin options
1.0
- First release



