{"id":252491,"date":"2025-10-10T10:10:07","date_gmt":"2025-10-10T10:10:07","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/country-access-control\/"},"modified":"2025-10-10T10:25:43","modified_gmt":"2025-10-10T10:25:43","slug":"country-access-control","status":"publish","type":"plugin","link":"https:\/\/lmo.wordpress.org\/plugins\/country-access-control\/","author":23357887,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"1.3.1","stable_tag":"trunk","tested":"6.8.5","requires":"6.0","requires_php":"7.4","requires_plugins":null,"header_name":"Country Access Control","header_author":"SDLCCorp","header_description":"Block access to specific posts\/pages by visitor country.","assets_banners_color":"","last_updated":"2025-10-10 10:25:43","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"","header_author_uri":"","rating":0,"author_block_rating":0,"active_installs":0,"downloads":192,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":[],"upgrade_notice":[],"ratings":[],"assets_icons":[],"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":[],"block_files":[],"assets_screenshots":[],"screenshots":{"1":"Post editor meta box with country selection","2":"Global settings panel for redirects and exceptions"},"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[1220,3751,2591,1914,186],"plugin_category":[49,55],"plugin_contributors":[249008],"plugin_business_model":[],"class_list":["post-252491","plugin","type-plugin","status-publish","hentry","plugin_tags-block","plugin_tags-country","plugin_tags-geo","plugin_tags-restrict","plugin_tags-seo","plugin_category-maps-and-location","plugin_category-seo-and-marketing","plugin_contributors-sdlccorp99","plugin_committers-sdlccorp99"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/country-access-control.svg","icon_2x":false,"generated":true},"screenshots":[],"raw_content":"<!--section=description-->\n<p>The <strong>SDLC Country Block<\/strong> plugin lets you restrict access to individual posts and pages based on the visitor\u2019s country, while keeping SEO bots and crawlers unblocked for safe indexing.<\/p>\n\n<h3>\ud83d\udd10 4 Layers of Country Detection<\/h3>\n\n<p>To ensure maximum compatibility, the plugin checks for the visitor\u2019s country in this order:\n1. <strong>Cloudflare header<\/strong> (<code>CF-IPCountry<\/code>)\n2. <strong>Server GeoIP variables<\/strong> (if your hosting environment provides them)\n3. <strong>PHP GeoIP extension<\/strong> (<code>geoip_country_code_by_name<\/code>)\n4. <strong>Wordfence plugin<\/strong> (using Wordfence GEO detection)<\/p>\n\n<p>\u26a0\ufe0f Note: At least <strong>one<\/strong> of these extensions or plugins must be enabled. If none are active, the plugin cannot detect visitor countries.<\/p>\n\n<h3>\u2728 Features<\/h3>\n\n<ul>\n<li>Per-post\/page multi-select of countries (full ISO list)<\/li>\n<li>SEO-safe: bots\/crawlers can bypass blocks<\/li>\n<li>Choose action: redirect to endpoint (\/blocked), redirect to custom URL, or 403<\/li>\n<li>Customizable endpoint slug<\/li>\n<li>Role-based bypass (e.g., admin, editor)<\/li>\n<li>Optional admin-only debug banner<\/li>\n<li>Proper sanitization, escaping, and nonces<\/li>\n<li>Sets <code>Vary: CF-IPCountry<\/code> for cache correctness<\/li>\n<li>Clean uninstall (removes options and post meta)<\/li>\n<\/ul>\n\n<p>This plugin is maintained by <strong><a href=\"https:\/\/sdlccorp.com\/\">SDLC CORP<\/a><\/strong> \u2014 a Digital Transformation Company with expertise in:\n- <strong>WordPress Development<\/strong>\n- <strong>Shopify Solutions<\/strong>\n- <strong>Artificial Intelligence (AI) &amp; Machine Learning<\/strong>\n- <strong>Model Development and NLP (Natural Language Processing)<\/strong>\n- Enterprise-grade <a href=\"https:\/\/sdlccorp.com\/ai-development-services\/\"><strong>AI Development Services<\/strong><\/a><\/p>\n\n<p>By publishing this open-source plugin, SDLC CORP demonstrates its commitment to empowering developers and businesses with scalable <strong>AI-driven solutions<\/strong> and modern web technologies.<\/p>\n\n<h3>Requirements &amp; Compatibility<\/h3>\n\n<p>For the plugin to work, at least <strong>one<\/strong> of the following extensions or plugins must be enabled on your server:<\/p>\n\n<ol>\n<li><strong>Cloudflare<\/strong> \u2192 Enable the <em>IP Geolocation<\/em> setting in your Cloudflare dashboard (adds the <code>CF-IPCountry<\/code> header).<\/li>\n<li><strong>Server GeoIP<\/strong> \u2192 Your hosting provider must support GeoIP (ask your host if they provide <code>GEOIP_COUNTRY_CODE<\/code>).<\/li>\n<li><strong>PHP GeoIP Extension<\/strong> \u2192 Install and enable the PHP <code>geoip<\/code> extension on your server (may require server admin\/hosting support).<\/li>\n<li><strong>Wordfence Plugin<\/strong> \u2192 Install the free <a href=\"https:\/\/wordpress.org\/plugins\/wordfence\/\">Wordfence Security plugin<\/a> and enable its country blocking\/GeoIP feature.<\/li>\n<\/ol>\n\n<p>\u27a1\ufe0f At least one of these must be active. If none are available, the plugin cannot detect visitor countries.<\/p>\n\n<h3>Third-Party Compatibility<\/h3>\n\n<p>This plugin is designed to work with third-party services such as <strong>Cloudflare<\/strong> and <strong>Wordfence<\/strong> when available.<br \/>\nSDLC Country Block is an independent plugin and is <strong>not affiliated with or endorsed by Cloudflare or Wordfence<\/strong>.<\/p>\n\n<h3>License<\/h3>\n\n<p>This plugin is free software: you can redistribute it and\/or modify it under the terms of the <strong>GNU General Public License<\/strong> as published by the Free Software Foundation, <strong>version 2 of the License, or (at your option) any later version<\/strong>.<\/p>\n\n<p>This plugin is distributed in the hope that it will be useful, but <strong>WITHOUT ANY WARRANTY<\/strong>; without even the implied warranty of <strong>MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE<\/strong>. See the GNU General Public License for more details.<\/p>\n\n<p>A copy of the GPL v2 license is included in this package. You can also see <a href=\"https:\/\/www.gnu.org\/licenses\/gpl-2.0.html\">https:\/\/www.gnu.org\/licenses\/gpl-2.0.html<\/a>.<\/p>\n\n<h3>Trademark<\/h3>\n\n<p>\u201cSDLC CORP\u201d and the SDLC CORP logo are trademarks of SDLC CORP.<br \/>\nThe GPL license covers the plugin\u2019s <strong>source code<\/strong>. It does <strong>not<\/strong> grant rights to use SDLC CORP\u2019s trademarks or branding in modified versions in a way that suggests endorsement or affiliation without permission.<\/p>\n\n<!--section=installation-->\n<ol>\n<li>Upload the <code>sdlc-country-block<\/code> folder to <code>\/wp-content\/plugins\/<\/code>.<\/li>\n<li>Activate the plugin via <strong>Plugins<\/strong> in WordPress Admin.<\/li>\n<li>Configure global settings under <strong>Settings \u2192 Country Block<\/strong>.<\/li>\n<li>Edit a post\/page \u2192 use the <strong>Country Block<\/strong> meta box \u2192 select restricted countries.<\/li>\n<li>Ensure that at least <strong>one<\/strong> detection method (Cloudflare, server GeoIP, PHP GeoIP, or Wordfence) is available for the plugin to work.<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt id='will%20this%20hurt%20seo%3F'><h3>Will this hurt SEO?<\/h3><\/dt>\n<dd><p>No. Search engines and known bots can be allowed to bypass blocks, ensuring your content remains indexable.<\/p><\/dd>\n<dt id='how%20do%20i%20customize%20the%20blocked%20page%3F'><h3>How do I customize the blocked page?<\/h3><\/dt>\n<dd><p>You can:\n- Create a template file called <code>blocked-country.php<\/code> in your theme, OR\n- Set a custom redirect URL in plugin settings.<\/p><\/dd>\n<dt id='what%20if%20my%20server%20doesn%E2%80%99t%20support%20geoip%3F'><h3>What if my server doesn\u2019t support GeoIP?<\/h3><\/dt>\n<dd><p>The plugin attempts detection in this order:\n1. Cloudflare IP header (<code>CF-IPCountry<\/code>)\n2. Server GeoIP variables\n3. PHP GeoIP extension\n4. Wordfence plugin GEO data<\/p>\n\n<p>At least <strong>one<\/strong> of these layers must be present for the plugin to function.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>1.3.1<\/h4>\n\n<ul>\n<li>Minor fixes and improvements.<\/li>\n<li>Updated documentation and metadata for WordPress.org release.<\/li>\n<\/ul>","raw_excerpt":"Block access to selected posts\/pages by visitor country, with SEO-safe bot bypass and customizable redirects.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/lmo.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/252491","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lmo.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/lmo.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/lmo.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=252491"}],"author":[{"embeddable":true,"href":"https:\/\/lmo.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/sdlccorp99"}],"wp:attachment":[{"href":"https:\/\/lmo.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=252491"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/lmo.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=252491"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/lmo.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=252491"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/lmo.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=252491"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/lmo.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=252491"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/lmo.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=252491"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}