Description
Trying to comply with every law in every country or state can be overwhelming. For many websites, blocking traffic from specific regions is a faster and more reliable alternative to implementing dozens of complex legal requirements individually.
Examples of compliance areas where blocking can help include:
- Age verification rules for adult, gaming, or alcohol-related content
- Data privacy regulations such as GDPR (EU), LGPD (Brazil), or CCPA (California)
- Content restrictions for gambling, streaming, or licensed media
- Financial regulations affecting payments, crypto, or banking services
- Tax obligations that differ across borders
- Advertising and marketing restrictions unique to certain jurisdictions
Instead of building compliance systems for every region, simply block the ones you don’t serve.
Plug and Play Geoblocker Lite makes this simple, fast, and private. Activate, select countries to block, and it immediately restricts access with a clean 403 page — no complicated setup.
If you need more power, the Pro version adds state-level blocking (U.S. states, Canadian provinces, UK regions, and more), visual message customization with full color control, advanced logs and analytics, and support for a local MaxMind GeoLite2 database for full independence from remote APIs.
Features
- Country-level blocking – Block visitors from any country with a simple checkbox
- Allow search crawlers – Let Google, Bing, and other search engines bypass blocking
- VPN/datacenter detection – Optional blocking of known hosting providers and VPN services
- Unknown IP policy – Choose to allow or block visitors when country can’t be determined
- MaxMind GeoLite2 support – Use local database for more accurate geolocation (requires free license key)
- Basic logging – Track blocked and allowed access attempts
- Emergency bypass – Special URL parameter to temporarily bypass blocking if needed
- Admin/login always allowed – WordPress admin and login pages are never blocked
External services
This plugin uses third-party IP geolocation APIs to detect a visitor’s country. The visitor’s IP is sent to one or more providers to retrieve the country code and ASN. Lite mode stores no permanent logs — only basic entries in the admin “Logs” tab and short-term transient caching to reduce API requests.
Providers used (in failover order), with terms and privacy:
1) IPWHOIS — https://ipwhois.io/terms / https://ipwhois.io/privacy
2) ip-api — https://ip-api.com/docs/legal / https://ip-api.com/privacy
3) ipapi — https://ipapi.co/terms/ / https://ipapi.co/privacy/
4) IPinfo — https://ipinfo.io/terms-of-service / https://ipinfo.io/privacy-policy
Installation
- Upload the plugin folder to
/wp-content/plugins/or install via Plugins Add New Upload. - Activate Plug and Play Geoblocker Lite.
- Go to Settings Plug and Play Geoblocker Lite and select the countries you wish to block.
- Visitors from blocked countries immediately receive a 403 page.
FAQ
-
Does it store visitor data?
-
Lite mode keeps minimal transient and log data for technical functionality, but does not permanently retain visitor IPs unless Pro features are enabled.
-
Will it work behind Cloudflare or other proxies?
-
Yes. It automatically prioritizes
HTTP_CF_CONNECTING_IPand other proxy headers before falling back toREMOTE_ADDR. -
How accurate is it?
-
Country-level accuracy is generally high. The Pro version adds the option to use a local MaxMind GeoLite2 database to improve reliability and reduce dependency on external APIs.
-
Can I customize the block message?
-
The Lite version uses a standard “Access Restricted” message. The Pro edition provides a visual message editor with full color customization, custom CSS, and redirect options for complete control over the block page appearance.
-
What if I accidentally block myself?
-
You can always access your WordPress admin login page at
yoursite.com/wp-admin– this URL is never blocked. Simply log in with your admin credentials. -
Can I block specific states or provinces?
-
State/province-level blocking is available in the Pro version for United States (50 states + territories), Canada (provinces & territories), United Kingdom, China, Australia, India, and Germany.
Reviews
Contributors & Developers
“Plug and Play Geoblocker Lite” is open source software. The following people have contributed to this plugin.
ContributorsTranslate “Plug and Play Geoblocker Lite” into your language.
Interested in development?
Browse the code, check out the SVN repository, or subscribe to the development log by RSS.
Changelog
1.0.3
- Minor updates and improvements
- Performance optimizations
1.0.2
- Initial WordPress.org release
- Country-level geoblocking
- Basic logging system
- MaxMind GeoLite2 support
- VPN/datacenter detection
1.0.1
- Internal testing release
1.0.0
- Initial release
