Title: Country Access Control
Author: SDLC Corp
Published: <strong>10 octombrie 2025</strong>
Last modified: 10 octombrie 2025

---

Caută module

![](https://s.w.org/plugins/geopattern-icon/country-access-control.svg)

# Country Access Control

 De [SDLC Corp](https://profiles.wordpress.org/sdlccorp99/)

[Descarcă](https://downloads.wordpress.org/plugin/country-access-control.zip)

 * [Detalii](https://ro.wordpress.org/plugins/country-access-control/#description)
 * [Recenzii](https://ro.wordpress.org/plugins/country-access-control/#reviews)
 *  [Instalare](https://ro.wordpress.org/plugins/country-access-control/#installation)
 * [Dezvoltare](https://ro.wordpress.org/plugins/country-access-control/#developers)

 [Suport](https://wordpress.org/support/plugin/country-access-control/)

## Descriere

The **SDLC Country Block** plugin lets you restrict access to individual posts and
pages based on the visitor’s country, while keeping SEO bots and crawlers unblocked
for safe indexing.

### 🔐 4 Layers of Country Detection

To ensure maximum compatibility, the plugin checks for the visitor’s country in 
this order:
 1. **Cloudflare header** (`CF-IPCountry`) 2. **Server GeoIP variables**(
if your hosting environment provides them) 3. **PHP GeoIP extension** (`geoip_country_code_by_name`)
4. **Wordfence plugin** (using Wordfence GEO detection)

⚠️ Note: At least **one** of these extensions or plugins must be enabled. If none
are active, the plugin cannot detect visitor countries.

### ✨ Features

 * Per-post/page multi-select of countries (full ISO list)
 * SEO-safe: bots/crawlers can bypass blocks
 * Choose action: redirect to endpoint (/blocked), redirect to custom URL, or 403
 * Customizable endpoint slug
 * Role-based bypass (e.g., admin, editor)
 * Optional admin-only debug banner
 * Proper sanitization, escaping, and nonces
 * Sets `Vary: CF-IPCountry` for cache correctness
 * Clean uninstall (removes options and post meta)

This plugin is maintained by **[SDLC CORP](https://sdlccorp.com/)** — a Digital 
Transformation Company with expertise in:
 – **WordPress Development** – **Shopify
Solutions** – **Artificial Intelligence (AI) & Machine Learning** – **Model Development
and NLP (Natural Language Processing)** – Enterprise-grade [**AI Development Services**](https://sdlccorp.com/ai-development-services/)

By publishing this open-source plugin, SDLC CORP demonstrates its commitment to 
empowering developers and businesses with scalable **AI-driven solutions** and modern
web technologies.

### Requirements & Compatibility

For the plugin to work, at least **one** of the following extensions or plugins 
must be enabled on your server:

 1. **Cloudflare**  Enable the _IP Geolocation_ setting in your Cloudflare dashboard(
    adds the `CF-IPCountry` header).
 2. **Server GeoIP**  Your hosting provider must support GeoIP (ask your host if they
    provide `GEOIP_COUNTRY_CODE`).
 3. **PHP GeoIP Extension**  Install and enable the PHP `geoip` extension on your server(
    may require server admin/hosting support).
 4. **Wordfence Plugin**  Install the free [Wordfence Security plugin](https://wordpress.org/plugins/wordfence/)
    and enable its country blocking/GeoIP feature.

➡️ At least one of these must be active. If none are available, the plugin cannot
detect visitor countries.

### Third-Party Compatibility

This plugin is designed to work with third-party services such as **Cloudflare**
and **Wordfence** when available.
 SDLC Country Block is an independent plugin and
is **not affiliated with or endorsed by Cloudflare or Wordfence**.

### License

This plugin is free software: you can redistribute it and/or modify it under the
terms of the **GNU General Public License** as published by the Free Software Foundation,**
version 2 of the License, or (at your option) any later version**.

This plugin is distributed in the hope that it will be useful, but **WITHOUT ANY
WARRANTY**; without even the implied warranty of **MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE**. See the GNU General Public License for more details.

A copy of the GPL v2 license is included in this package. You can also see [https://www.gnu.org/licenses/gpl-2.0.html](https://www.gnu.org/licenses/gpl-2.0.html).

### Trademark

“SDLC CORP” and the SDLC CORP logo are trademarks of SDLC CORP.
 The GPL license
covers the plugin’s **source code**. It does **not** grant rights to use SDLC CORP’s
trademarks or branding in modified versions in a way that suggests endorsement or
affiliation without permission.

## Instalare

 1. Upload the `sdlc-country-block` folder to `/wp-content/plugins/`.
 2. Activate the plugin via **Plugins** in WordPress Admin.
 3. Configure global settings under **Settings  Country Block**.
 4. Edit a post/page  use the **Country Block** meta box  select restricted countries.
 5. Ensure that at least **one** detection method (Cloudflare, server GeoIP, PHP GeoIP,
    or Wordfence) is available for the plugin to work.

## Întrebări frecvente

### Will this hurt SEO?

No. Search engines and known bots can be allowed to bypass blocks, ensuring your
content remains indexable.

### How do I customize the blocked page?

You can:
 – Create a template file called `blocked-country.php` in your theme, OR–
Set a custom redirect URL in plugin settings.

### What if my server doesn’t support GeoIP?

The plugin attempts detection in this order:
 1. Cloudflare IP header (`CF-IPCountry`)
2. Server GeoIP variables 3. PHP GeoIP extension 4. Wordfence plugin GEO data

At least **one** of these layers must be present for the plugin to function.

## Recenzii

Nu există nicio verificare pentru acest modul.

## Contributori și dezvoltatori

„Country Access Control” este un software open-source. La acest modul au contribuit
următoarele persoane.

Contributori

 *   [ SDLC Corp ](https://profiles.wordpress.org/sdlccorp99/)

[Tradu „Country Access Control” în limba ta.](https://translate.wordpress.org/projects/wp-plugins/country-access-control)

### Te interesează dezvoltarea?

[Răsfoiește codul](https://plugins.trac.wordpress.org/browser/country-access-control/),
vezi [depozitarul SVN](https://plugins.svn.wordpress.org/country-access-control/),
sau abonează-te la [jurnalul de dezvoltare](https://plugins.trac.wordpress.org/log/country-access-control/)
prin [RSS](https://plugins.trac.wordpress.org/log/country-access-control/?limit=100&mode=stop_on_copy&format=rss).

## Istoric modificări

#### 1.3.1

 * Minor fixes and improvements.
 * Updated documentation and metadata for WordPress.org release.

## Meta

 *  Versiunea **1.3.1**
 *  Ultima actualizare **Acum 6 luni**
 *  Instalări active: **Mai puțin de 10**
 *  Versiune WordPress ** 6.0 sau mai recentă **
 *  Testat până la **6.8.5**
 *  Versiune PHP ** 7.4 sau mai recentă **
 *  Limbă
 * [English (US)](https://wordpress.org/plugins/country-access-control/)
 * Etichete
 * [block](https://ro.wordpress.org/plugins/tags/block/)[country](https://ro.wordpress.org/plugins/tags/country/)
   [geo](https://ro.wordpress.org/plugins/tags/geo/)[restrict](https://ro.wordpress.org/plugins/tags/restrict/)
   [seo](https://ro.wordpress.org/plugins/tags/seo/)
 *  [Vizualizare avansată](https://ro.wordpress.org/plugins/country-access-control/advanced/)

## Evaluări

Nu a fost trimisă nicio recenzie până acum.

[Your review](https://wordpress.org/support/plugin/country-access-control/reviews/#new-post)

[Vezi toate recenziile](https://wordpress.org/support/plugin/country-access-control/reviews/)

## Contributori

 *   [ SDLC Corp ](https://profiles.wordpress.org/sdlccorp99/)

## Suport

Ai ceva de zis? Ai nevoie de ajutor?

 [Vezi forumul pentru suport](https://wordpress.org/support/plugin/country-access-control/)