WooCommerce Country Block
Control which countries can access your WooCommerce store. Block selected countries before visitors reach your products or checkout, using WooCommerce geolocation and an optional Cloudflare country header.
Blocked visitors receive a clear unavailable page with a proper HTTP 503 response. There are no redirects, fake 404 pages, tracking scripts, telemetry or external API requests.
One-time fee, no subscription required.
Plugin Overview
WooCommerce Country Block is a lightweight way to restrict access from selected countries without redirects, fake 404s, or messy “Access denied” pages.
Instead, blocked visitors receive a proper HTTP 503 Service Unavailable response (with noindex + no-cache headers). You can show:
- your existing /unavailable page (rendered internally, theme-aware), or
- a simple custom message (heading + message + apology) defined in settings.
Key benefits
- Country-based blocking using WooCommerce geolocation
- Proper HTTP 503 response (SEO-friendly for temporary restrictions)
- Uses your existing /unavailable page (theme-aware)
- Optional custom message (no redirect, URL stays unchanged)
- Built-in no-cache + noindex response headers
- No tracking, no telemetry, no external requests
How it Works and What to Expect
- Country detection
The plugin detects the visitor’s country using WooCommerce geolocation.
If Cloudflare is detected, it can also use Cloudflare’s country header. - Country match
If the detected country matches your blocked list, the request is intercepted early. - 503 response + headers
The visitor receives HTTP 503 Service Unavailable plus no-cache and noindex signals. - Page rendering
Blocked visitors will see either:- your existing /unavailable page (rendered internally), or
- the plugin’s custom message (if you entered any custom text in settings)
- Fallback safety
If /unavailable does not exist, a clean fallback message is displayed automatically.
Admin/login/cron/AJAX/REST endpoints are always allowed to prevent lockouts.
Performance Overview
WooCommerce Country Block is designed to be invisible when not blocking:
- Runs early in the request lifecycle
- No extra database work for normal visitors
- No front-end scripts, no tracking pixels
- No external HTTP calls
- Plays nicely with caching layers and CDNs (blocked responses are marked no-cache)
When blocking is active, explicit no-cache headers help prevent accidental caching of the 503 response.
Requirements & Compatibility
- WordPress 6.0 or higher (recommended)
- PHP 7.4 or higher (PHP 8+ recommended)
- WooCommerce (required for geolocation)
- Works with any theme
- Compatible with common caching plugins and CDNs
Language Support
This plugin WooCommerce Country Block is translated into the following languages:
- English US and UK
- Spanish
- German
- French
- Portuguese
- Italian
Custom Language Files
The plugin includes ready-to-use translations and follows WordPress i18n standards. You can also add your own .po and .mo files for any language, or translate plugin strings using tools like Polylang, WPML, or TranslatePress. No external services are required.
Documentation
For more details about how the plugin works, please refer to the documentation.
License
This plugin is licensed under the LitePlugin.com Commercial License:
- 1 licence per domain
- Lifetime use for the licensed site
- No subscriptions
- No tracking / telemetry
- For more details, visit: LitePlugin License






