Title: AA Block country with redirect
Author: AA Extensions
Published: <strong>2014-11-08</strong>
Last modified: 2025-06-02

---

Szukaj wtyczek

![](https://ps.w.org/aa-block-country-with-redirect/assets/banner-772x250.png?rev
=3304942)

Wtyczka **nie została przetestowana z trzema ostatnimi głównymi wydaniami WordPressa**.
Może nie być już utrzymywana lub obsługiwana, co może skutkować problemem ze zgodnością
z nowszymi wersjami WordPressa.

![](https://ps.w.org/aa-block-country-with-redirect/assets/icon-128x128.png?rev=
1026953)

# AA Block country with redirect

 Autor: [AA Extensions](https://profiles.wordpress.org/aaextensions/)

[Pobierz](https://downloads.wordpress.org/plugin/aa-block-country-with-redirect.1.0.1.zip)

 * [Szczegóły](https://pl.wordpress.org/plugins/aa-block-country-with-redirect/#description)
 * [Recenzje](https://pl.wordpress.org/plugins/aa-block-country-with-redirect/#reviews)
 * [Rozwój](https://pl.wordpress.org/plugins/aa-block-country-with-redirect/#developers)

 [Wsparcie](https://wordpress.org/support/plugin/aa-block-country-with-redirect/)

## Opis

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

 1.  **IP Detection:** Retrieves the visitor’s IP address using multiple server variables
     for reliability.
 2.  **Country Lookup via API:** Optionally uses `ip-api.com` to detect the visitor’s
     country based on IP.
 3.  **Per-Post/Page Country Blocking:** Enable or disable country blocking on individual
     posts, pages, or custom post types.
 4.  **Custom Blocked Countries:** Set blocked countries using comma-separated ISO 
     country codes (e.g., `US, IN, FR`).
 5.  **Global Country Blocking:** Define global blocking rules that apply across the
     entire site.
 6.  **Redirect Blocked Users:** Automatically redirect blocked visitors to a custom
     URL defined in plugin settings.
 7.  **Fallback Country Option:** Specify a fallback country code in case API lookup
     fails.
 8.  **Meta Box UI:** Adds a meta box to all public post types for easy control of 
     country blocking.
 9.  **Secure Meta Handling:** Uses WordPress nonces and capability checks to securely
     save meta data.
 10. **Lightweight Integration:** Executes only on the front-end using the `template_redirect`
     hook, keeping the admin side fast.

#### How to use it

 1. **Configure Global Settings:** Go to the plugin settings page and enable global
    country blocking. Set the list of blocked country codes and the redirect URL.
 2. **Choose IP Lookup Method:** Enable or disable IP lookup via `ip-api.com` based
    on your preference.
 3. **Block Countries Globally:** Visitors from blocked countries will be automatically
    redirected site-wide.
 4. **Set 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.
 5. **Save Changes:** Update or publish your post/page to apply per-post blocking rules.
 6. **Test Blocking:** Use a VPN or proxy from a blocked country to verify the redirect
    works as expected.

#### Installation

 1. Download the plugin ZIP file from the source.
 2. Log in to your WordPress admin dashboard.
 3. Navigate to **Plugins > Add New**.
 4. Click **Upload Plugin** and select the downloaded ZIP file.
 5. Click **Install Now** and then **Activate** the plugin.
 6. Go to the plugin settings page to configure country blocking options.

#### Screenshots

Coming Soon ..

#### Changelog

 1. **Version 1.0.1** (2025-06-02)
 2.  a. Fixed IP detection logic to better handle proxy headers.
     b. Improved country code sanitization for per-post blocking.
     c. Added nonce verification to meta box save function for enhanced security.
     d. Optimized API request to `ip-api.com` with error handling improvements.
     e. Updated admin meta box UI for better usability.

## Recenzje

Wtyczka nie ma jeszcze żadnej recenzji.

## Kontrybutorzy i deweloperzy

„AA Block country with redirect” jest oprogramowaniem open source. Poniższe osoby
miały wkład w rozwój wtyczki.

Zaangażowani

 *   [ AA Extensions ](https://profiles.wordpress.org/aaextensions/)

[Przetłumacz wtyczkę “AA Block country with redirect” na swój język.](https://translate.wordpress.org/projects/wp-plugins/aa-block-country-with-redirect)

### Interesuje cię rozwój wtyczki?

[Przeglądaj kod](https://plugins.trac.wordpress.org/browser/aa-block-country-with-redirect/),
sprawdź [repozytorium SVN](https://plugins.svn.wordpress.org/aa-block-country-with-redirect/)
lub czytaj [dziennik rozwoju](https://plugins.trac.wordpress.org/log/aa-block-country-with-redirect/)
przez [RSS](https://plugins.trac.wordpress.org/log/aa-block-country-with-redirect/?limit=100&mode=stop_on_copy&format=rss).

## Meta

 *  Wersja **1.0.1**
 *  Ostatnia aktualizacja **1 rok temu**
 *  Włączone instalacje **10+**
 *  Wersja WordPressa ** 5.2 lub nowszej **
 *  Testowano do **6.8.11**
 *  Język
 * [English (US)](https://wordpress.org/plugins/aa-block-country-with-redirect/)
 * Tagi
 * [aaextension](https://pl.wordpress.org/plugins/tags/aaextension/)[aaextensions](https://pl.wordpress.org/plugins/tags/aaextensions/)
   [block country](https://pl.wordpress.org/plugins/tags/block-country/)[ip](https://pl.wordpress.org/plugins/tags/ip/)
   [redirect](https://pl.wordpress.org/plugins/tags/redirect/)
 *  [Widok zaawansowany](https://pl.wordpress.org/plugins/aa-block-country-with-redirect/advanced/)

## Oceny

Nie przesłano jeszcze żadnych recenzji.

[Twoja opinia](https://wordpress.org/support/plugin/aa-block-country-with-redirect/reviews/#new-post)

[Zobacz wszystkierecenzje.](https://wordpress.org/support/plugin/aa-block-country-with-redirect/reviews/)

## Zaangażowani

 *   [ AA Extensions ](https://profiles.wordpress.org/aaextensions/)

## Wsparcie

Masz coś do dodania? Potrzebujesz pomocy?

 [Zobacz forum wsparcia](https://wordpress.org/support/plugin/aa-block-country-with-redirect/)

## Złóż datek

Czy chcesz wesprzeć rozwój wtyczki?

 [ Wspomóż wtyczkę ](https://aaextensions.com)