

Country redirect rules settings
IPGeolocation.io – Geo Redirects & Content Control decides what each visitor sees based on where they are and what IP address they are using.
You can send people from one country to a different page, keep unwanted IP addresses away from your site or your login page, and show or hide parts of a page depending on the visitor’s location. Everything is set up from one settings screen, and you do not need to write any code.
The plugin uses the ipgeolocation.io API to work out a visitor’s country and other details. Results are stored for 24 hours per address, so your site stays fast.
The IP section asks two questions, and you answer them separately:
For each one, you can leave it open to everyone, block a list of addresses, or allow only a list of addresses. Locking the login page to your office address is a simple way to stop password guessing bots, and ordinary visitors are not affected at all.
IP rules are checked before any location lookup, so blocking somebody uses none of your API credits.
The plugin supports the following API plans from ipgeolocation.io:
Additional security-related features are available for paid plans only.
Blocking by IP address does not need an API key. Everything based on country does.
[ipgeo country]
[ipgeo city]
[ipgeo country_code]
Available fields include:
ip, city, state, country, country_code, zipcode, continent, latitude, longitude, currency, calling_code, languages, is_proxy, is_tor, is_anonymous, cloud_provider
[ipgeo_if country_code="US,CA" logic="OR"]Visible to visitors from the US or Canada.[/ipgeo_if]
Supported attributes: country, country_code, state, city, continent, is_proxy, is_tor, is_cloud_provider, is_anonymous, logic (AND / OR)
[ipgeo_if_not country="Germany"]Hidden from visitors in Germany.[/ipgeo_if_not]
Both shortcodes accept the same attributes, so you can hide content from one country just as easily as showing it to another.
For testing or user control, redirects can be bypassed:
?geo_bypass=1 bypasses redirects for 30 days?geo_reset=1 resets the bypass cookieThis does not affect IP rules.
This plugin connects to two outside services.
ipgeolocation.io
Used to find the country, region, city and security details for a visitor’s IP address. This powers country redirects, country access control and the shortcodes.
The visitor’s IP address and your API key are sent to https://api.ipgeolocation.io/v3/ipgeo when a page needs location data. Results are stored for 24 hours per address, so a returning visitor does not cause a second request. Nothing is sent if you have not entered an API key, and nothing is sent for a visitor already blocked by an IP rule.
An API key is required. You can get one by creating a free or paid account at ipgeolocation.io. Without it, the country-based features will not work.
Terms of service: https://ipgeolocation.io/tos.html
Privacy policy: https://ipgeolocation.io/privacy.html
Cloudflare
Used only to keep an up-to-date list of Cloudflare server addresses. The plugin needs this list to tell whether a Cloudflare header can be trusted. Without it, that header could be faked by anyone.
Once a day the plugin requests https://www.cloudflare.com/ips-v4 and https://www.cloudflare.com/ips-v6. No visitor information, site information or personal data is sent. If the request fails, a copy included with the plugin is used instead. This only happens when address detection is set to Automatic or Cloudflare.
Terms of service: https://www.cloudflare.com/website-terms/
Privacy policy: https://www.cloudflare.com/privacypolicy/
This plugin is licensed under the GPL v2 or later.