- What country blocking stops, and what it does not
- The options side by side
- Option A: a Cloudflare rule
- Option B: block countries in WordPress for free with AdminEase
- Test it from outside
1. What country blocking stops, and what it does not
A large share of automated login attempts, comment spam and vulnerability scanning comes from a handful of networks. If you sell only in Europe, nobody in a country you do not ship to has a reason to load your login page, and refusing them cuts that noise at no cost to real customers.
That is the whole benefit, and it is worth being clear about the limits:
- A VPN walks straight past it. Anyone who wants in from a blocked country can pick an exit in an allowed one in seconds. Country blocking removes bulk traffic, not a determined attacker.
- It does nothing about attacks from allowed countries, which includes most compromised servers and most botnets, since those run on ordinary hosting everywhere.
- It does not patch anything. A vulnerable plugin is exactly as vulnerable to a visitor from an allowed country.
- It blocks real people too. Your customer on holiday, your developer abroad, and a search engine crawling from a data centre in a blocked country all get the same 403.
Use it to reduce noise. Keep your plugins updated, use two-factor on admin accounts, and treat it as one layer rather than the security plan.
2. The options side by side
.tutorial-article .pwp-compare { width: 100%; border-collapse: collapse; } .tutorial-article .pwp-compare th, .tutorial-article .pwp-compare td { color: #e8ece9 !important; padding: 12px 14px; border: 1px solid rgba(255,255,255,0.18); vertical-align: top; text-align: left; } .tutorial-article .pwp-compare thead th { color: #ffffff !important; font-weight: 700; background: rgba(255,255,255,0.06); } .tutorial-article .pwp-compare td:first-child { color: #ffffff !important; }| Wordfence Free | Wordfence Premium | Cloudflare Free | AdminEase Free | |
|---|---|---|---|---|
| Country blocking | No | Yes | Yes, as a custom rule | Yes |
| Where it blocks | Not available | On your server | At Cloudflare, before your server | On your server |
| Web application firewall | Yes, rules 30 days behind Premium | Yes, real-time rules | Yes, managed rules vary by plan | No |
| Cost | Free | $149 a year, one site | Free, 5 custom rules | Free |
Two things the table makes plain. If you are already on Cloudflare, that is the better place to block, because the request never reaches your server at all. And Wordfence Premium is not only country blocking: the $149 also buys real-time firewall rules, which the free version gets 30 days late. If you want that, it is a fair price. If you only want to refuse a few countries, you do not need to pay for it.
3. Option A: a Cloudflare rule
If your site already runs through Cloudflare, do it there and skip AdminEase for this.
(ip.src.country in {"KP" "SY"})That is Cloudflare's own documented example, as the expression the rule builder produces. Use the two-letter ISO code for each country.
4. Option B: block countries in WordPress for free with AdminEase
If you are not on Cloudflare, or want the setting to live inside WordPress, AdminEase does it in the free plugin. First, AdminEase has to be able to tell where a visitor is. It reads that from Cloudflare's country header or from the PHP GeoIP extension on your server. With neither, the toggle reports "Unfortunately your server does not support this feature" and cannot be turned on.
/wp-json/, /wp-admin/admin-ajax.php, /wp-cron.php.
/wp-admin/ and /wp-login.php if that is likely.
Save, and AdminEase writes the block into .htaccess on Apache and LiteSpeed, or enforces it in PHP on Nginx, where .htaccess is not read. A blocked visitor gets a plain 403 Forbidden. Scheduled tasks and WP-CLI are never blocked.
AdminEase Pro adds three optional controls on top: Whitelisted IP Addresses, Allow common bots and Allow specific bots, for letting a known office address or a search engine through a country you otherwise block. Country blocking itself is free. For choosing between Cloudflare and GeoIP, and installing GeoIP on your own server, see the full geo-blocking walkthrough.
5. Test it from outside
Do not trust the saved setting. Check it.
Where to go from here
Country blocking is a cheap way to reduce the traffic you have to worry about, and a poor substitute for anything else. AdminEase is not a firewall and does not scan for malware. If you want those, Wordfence Premium is a reasonable purchase and the $149 covers more than country blocking. If all you wanted was to turn a few countries away, you now have that for free. The AdminEase hardening checklist covers the other free settings worth turning on while you are there.
Frequently asked questions
Is country blocking free in Wordfence?
No. Wordfence's own plugin listing marks it as a Premium feature. Premium was $149 a year for one site when this was written.
Is AdminEase a Wordfence alternative?
For country blocking, yes. For the rest of Wordfence, no. AdminEase has no firewall, no malware scanning and no two-factor authentication. It blocks countries and bots and applies hardening settings.
Why is the toggle greyed out?
AdminEase cannot see visitors' countries. Put the site behind Cloudflare with IP Geolocation on, or ask your host for the PHP GeoIP extension.
I blocked a country and nothing changed. Why?
Usually the country data is not arriving. On Cloudflare, IP Geolocation is off by default. Turn it on under Network, then test again with a VPN.
Will it block Google?
It can, if Google crawls from a data centre in a country you blocked. Most sites never notice, but if search traffic matters, keep the blocked list short, or use Pro's bot allowlist.
Can I lock myself out?
Not while setting it up: your current country is removed from the list. Later, yes, if you travel to a blocked country, because admins are not exempt. Exclude /wp-admin/ and /wp-login.php if that could happen.
Settings reference
This setting has a reference page: Block specific countries. For the wider picture, including bot blocking and the other access rules, see the geo-blocking and bot protection guide.
Related reading
Keep going: Geo-blocking and bot protection · Hardening WordPress security · Block wp-json/batch/v1 safely
This walkthrough uses AdminEase.
