AA Block country with redirect
We know many times , people have to redirect their visitor to their respective pages according to their country. In this plugin we keep this option. So that you can easily redirect your visitor to their respective country. Features IP Detection: Retrieves the visitor’s IP address using multiple serv
We know many times , people have to redirect their visitor to their respective pages according to their country. In this plugin we keep this option. So that you can easily redirect your visitor to their respective country.
Features
- 01IP Detection: Retrieves the visitor’s IP address using multiple server variables for reliability.
- 02Country Lookup via API: Optionally uses `ip-api.com` to detect the visitor’s country based on IP.
- 03Per-Post/Page Country Blocking: Enable or disable country blocking on individual posts, pages, or custom post types.
- 04Custom Blocked Countries: Set blocked countries using comma-separated ISO country codes (e.g., `US, IN, FR`).
- 05Global Country Blocking: Define global blocking rules that apply across the entire site.
- 06Redirect Blocked Users: Automatically redirect blocked visitors to a custom URL defined in plugin settings.
- 07Fallback Country Option: Specify a fallback country code in case API lookup fails.
- 08Meta Box UI: Adds a meta box to all public post types for easy control of country blocking.
- 09Secure Meta Handling: Uses WordPress nonces and capability checks to securely save meta data.
- 10Lightweight Integration: Executes only on the front-end using the `template_redirect` hook, keeping the admin side fast.
How to use it
- 11Configure Global Settings: Go to the plugin settings page and enable global country blocking. Set the list of blocked country codes and the redirect URL.
- 12Choose IP Lookup Method: Enable or disable IP lookup via `ip-api.com` based on your preference.
- 13Block Countries Globally: Visitors from blocked countries will be automatically redirected site-wide.
- 14Set Per-Post Blocking: Edit any post, page, or custom post type, and in the “AA Country Block Options” meta box, enable blocking and specify country codes to block for that content only.