IPGeolocation – Geo Redirects & Content Control

Description

IPGeolocation – Geo Redirect & Content Control is a powerful WordPress plugin that allows you to control how visitors interact with your site based on their geographic location.

The plugin uses the ipgeolocation.io API to determine a visitor’s country and other metadata, enabling advanced geo-based logic without slowing down your site.

Main Features

  • Country-based redirects (entire site, specific pages, or URL patterns)
  • Optional popup confirmation before redirect
  • Country-level access control (allow or block)
  • Conditional content shortcodes
  • Output visitor geolocation data via shortcode
  • Page and query-string exclusions
  • Redirect bypass and reset via URL parameters
  • Bot detection (search engines & social crawlers excluded)
  • Administrator-safe (admins are never redirected)
  • IP response caching using WordPress transients

Configuration

The plugin supports the following API plans from ipgeolocation.io:

  • Developer
  • Standard
  • Advanced
  • Security

Depending on the plan, additional security-related fields may be available.

Shortcodes

Display Single Geolocation Field

[ipgeo country]
[ipgeo city]
[ipgeo country_code]
[ipgeo latitude]
[ipgeo longitude]

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

Conditional Content (Show If Match)

[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
* proxy_type
* logic (AND / OR)

Conditional Content (Hide If Match)

[ipgeo_if_not country=”Germany”]
Hidden from visitors in Germany.
[/ipgeo_if_not]

Redirect Bypass

For testing or user control, redirects can be bypassed:

  • ?geo_bypass=1 — bypass redirects for 30 days
  • ?geo_reset=1 — reset the bypass cookie

External Services Used

This plugin relies on the ipgeolocation.io API to provide its core geolocation functionality.

API Features Used:
– Determines visitor country, city, state, continent, latitude/longitude, and more
– Detects proxy, VPN, Tor usage, and cloud providers
– Enables country-based redirects, content visibility rules, and access control
– Caches API responses for 24 hours per IP to reduce requests and improve performance

Important Notes:
– An ipgeolocation.io API key is required. You can obtain one by creating a free or paid account at ipgeolocation.io.
– Without the API, the plugin’s core features (redirects, content rules, access control) will not function.
– All API calls respect the user’s privacy and are only used for geolocation purposes.

Link to Terms of Use: ipgeolocation.io Terms

License

This plugin is licensed under the GPL v2 or later.

Screenshots

  • Country redirect rules settings
  • Redirect confirmation popup
  • Country access control settings
  • Conditional content shortcodes

Installation

  1. Upload the plugin folder to /wp-content/plugins/.
  2. Activate the plugin via Plugins Installed Plugins.
  3. Enter your ipgeolocation.io API key in the plugin settings.
  4. Configure redirect rules, exclusions, or country access rules.

FAQ

Does this plugin redirect logged-in administrators?

No. Administrators are automatically excluded.

Are bots and search engines redirected?

No. Known bots (Google, Bing, Facebook, Twitter, etc.) are excluded.

Does the plugin cache API responses?

Yes. IP data is cached for 24 hours per IP.

Does it work with Cloudflare?

Yes. The plugin supports the CF-Connecting-IP header.

Will this slow down my site?

No. API results are cached and redirects are handled efficiently.

Reviews

There are no reviews for this plugin.

Contributors & Developers

“IPGeolocation – Geo Redirects & Content Control” is open source software. The following people have contributed to this plugin.

Contributors

Changelog

1.0.0

  • Initial public release
  • Country redirects with popup support
  • Country access allow/block rules
  • Conditional shortcodes
  • Bot detection and caching