
Chazie Baniquid
Technical Content Marketer
3 minutes to read
How to block countries in Ultimate Member?
Ultimate Member does not support country blocking on its own. To stop unwanted registrations, spam, or abusive traffic, you’ll need to use a third-party tool. The easiest solution is the OOPSpam Anti-Spam plugin (that’s us 👋), which lets you block specific countries at the form level. For wider protection beyond Ultimate Member, you can use Cloudflare Firewall Rules to block traffic from entire countries before they reach your site.
Why Ultimate Member Doesn’t Do This Directly
Ultimate Member is built for user management, not traffic blocking.
It focuses on creating profiles, handling registrations, and restricting content by roles. Security controls like country blocking aren’t part of its core features because these are typically handled by security plugins or your hosting provider’s firewall.
Most importantly, this means you’ll need a separate plugin or a network-level firewall to block spam or access from unwanted countries.
Option 1: Block Countries in Ultimate Member Forms with OOPSpam
OOPSpam gives you direct control over form submissions.
It integrates with WordPress forms, including Ultimate Member, and lets you decide which countries can submit registrations or login attempts.
Key Features include:
- Country filtering to allow or block submissions.
- Language filtering for unwanted entries.
- Submission frequency limits to stop abuse.
- Machine learning-based spam detection that catches bots and automated signups.
- Proxy, VPN, and TOR blocking for stronger protection.
- Submission logs so you know what was blocked and why.
How to Set It Up
Install the OOPSpam Anti-Spam plugin from your WordPress dashboard. Create an account at OOPSpam.com and generate an API key.
Go to OOPSpam Anti-Spam > Settings and paste your API key.
Enable protection for Ultimate Member forms in the settings.
Scroll to the Country Filtering section under the General Settings tab and select the countries to block or allow.
Save changes and review blocked entries under Spam & Ham logs in WordPress.
For deeper insights, visit the OOPSpam Dashboard where you’ll see reports, blocking reasons, and spam trends over time.
Option 2: Block Entire Countries with Cloudflare
If your issue is bigger than spam, use Cloudflare Firewall.
Cloudflare lets you block traffic at the network level, stopping attacks before they even reach your WordPress site.
How to Do It
- Log in to your Cloudflare account.
- Go to Security > WAF > Firewall Rules.
- Create a new rule and name it “Block Countries.”
- Set the field to Country, operator to is in, and select the countries to block.
- Choose Block as the action, then save.
Visitors from those countries will now be denied access to your entire site, not just Ultimate Member forms.
Final thoughts
The main takeaway is this:
- OOPSpam gives you form-level control, letting you block spam registrations by country inside Ultimate Member.
- Cloudflare Firewall provides site-wide security, stopping abusive traffic before it hits your server.
Together, these tools give you the flexibility and protection that Ultimate Member alone cannot provide, keeping your site safer while still letting the right users in.