Linux 软件免费装
Banner图

IPGeolocation.io – Geo Redirects & Content Control

开发者 ipgeolocation
更新时间 2026年9月30日 18:21
PHP版本: 7.4 及以上
WordPress版本: 7.1
版权: GPLv2 or later
版权网址: 版权信息

标签

geolocation access control ip blocking geo redirect country blocking

下载

1.2.0 1.3.0 1.4.0 1.1.0 1.0.0

详情介绍:

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. Main Features Blocking Visitors By IP Address 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.

安装:

  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, country access rules, or IP rules.

屏幕截图:

  • Redirect confirmation popup
  • Country access control settings
  • Conditional content shortcodes
  • IP access control, showing your own address and the two access questions

升级注意事项:

1.4.0 Adds a setting for how often visitors are redirected, and popups now remember the answer. Existing sites keep redirecting once per hour until they choose otherwise. 1.3.0 Fixes redirects to other domains and makes redirects, popups and blocking work with page caching. Recommended for all sites. 1.2.0 Adds IP address blocking for your site and your login page, and fixes a security problem where a visitor could fake their location using request headers. If your site is behind a CDN or proxy, check the detected address on the settings screen after updating. 1.1.0 This update upgrades the internal API to v3. Existing plan types (Standard, Advanced, Security) will be automatically migrated to Paid Plan. No action required. 1.0.0 Initial release.

常见问题:

Does this plugin redirect logged-in administrators?

No. Administrators are automatically excluded from redirects, and by default they are never blocked by IP rules either. You can change that in Advanced settings.

Are bots and search engines redirected?

Known bots (Google, Bing, Facebook, X and others) are excluded from country redirects. IP rules do not skip them, because any browser can claim to be a search engine. To exempt a crawler from an IP rule, add its addresses to your safe list.

Does the plugin cache API responses?

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

Does it work with Cloudflare?

Yes. Choose the Cloudflare option under Advanced settings. The plugin only trusts Cloudflare's headers when the request genuinely came from a Cloudflare server, so nobody can pretend to be at a different address.

Will this slow down my site?

No. API results are cached, and IP rules are a simple local check with no lookup involved.

Do I need an API key to block IP addresses?

No. Blocking by IP address works without a key. Country features need one.

How do I find my own IP address?

The settings screen shows it at the top of the IP section, with a button that adds it to your safe list.

The plugin shows the wrong IP address for me. Why?

Your site is probably behind a CDN or proxy, which replaces the address your server sees. Open Advanced settings and choose the option that matches your setup, then check the address again after saving.

I locked myself out of my login page. How do I get back in?

Add this line to your wp-config.php file, log in, fix the rule, then remove the line: define( 'IPGEO_DISABLE_IP_ACCESS', true ); The plugin normally refuses to save a rule that would lock you out, so this should be rare.

Does it work with a caching plugin or CDN?

Yes, since 1.3.0. A page cache serves a stored copy of a page without running WordPress, so a visitor's country cannot be checked while the page is built. With "Cached page support" on (the default), every page carries a small script that asks your site what to do for each new visitor, using the same rules the server uses, and then remembers the answer. It works with WP Rocket, LiteSpeed Cache, W3 Total Cache, WP Super Cache, Cloudflare, Varnish, and host caches alike. Visitors on uncached pages are still redirected instantly by the server.

Can I block countries or IP addresses on a cached site?

Only if blocked visitors are never served a cached copy. While visitor blocking rules are active, the plugin stops public pages from being cached (Settings > Page caching). If you would rather keep caching, enforce the block at your CDN instead, for example with a Cloudflare WAF rule, and turn that option off. Sites that already had blocking rules active when they updated to 1.3.0 keep their previous behaviour until they turn it on.

Why was a visitor not redirected?

Use "Test a visitor" at the bottom of the settings page, or define IPGEO_DEBUG as true in wp-config.php: every response then carries an X-IPGeo-Decision header naming the reason, such as excluded, already_redirected or no_rule_for_country.

Can one rule cover several countries?

Yes. Enter the codes separated by commas, for example GR, CY.

How often is the same visitor redirected?

You choose, above the redirect rules: every visit (the default for new installs), once per browser session, once per hour or once per day. Each rule can override it under How Often, for example every visit for your local store and once per day for a promotion. Sites that used the plugin before 1.4.0 keep once per hour, the earlier behaviour, until they change it. Visitors who choose to stay, through a ?geo_bypass=1 link or by answering "No" to a popup, are never redirected for 30 days.

What does a popup remember?

The answer, for 30 days. "Yes" sends the visitor to the other site automatically on later visits, "No" keeps them on this one. If you change the destination of the rule, visitors are asked again. Closing the popup without answering asks again in the next browser session.

Why does ?ipgeo_from=1 appear in the address after a redirect?

It is added when a visitor is sent to another site. If that site also runs this plugin, it stops the two sites from sending the visitor back and forth, and the plugin there removes it from the address bar. If the other site does not run this plugin, nothing can remove it there: switch off "Add ?ipgeo_from=1 when sending visitors to another site" above the redirect rules.

How do I test redirects with a VPN?

Use a private browser window, and open a new one after changing location. Or add ?geo_reset=1 to the address, which clears everything the plugin remembers about you.

更新日志:

1.4.0 1.3.0 1.2.0 1.1.0 1.0.0