
Chazie Baniquid
Technical Content Marketer
7 minutes to read
How to block countries in MailPoet?
If you’re using MailPoet to send emails or manage subscriptions, you might want to block signups or email delivery from certain countries. While MailPoet doesn’t offer a built-in way to do this, there are effective ways to manage it. This guide covers several methods, including plugin-based filtering, subscriber segmentation, and server-level country blocking.
Does MailPoet Have Built-In Country Blocking?
Not directly. MailPoet doesn’t allow you to prevent users from certain countries from accessing subscription forms or signing up.
However, there are multiple ways to work around this limitation:
- Segment subscribers by country using WooCommerce data
- Filter form submissions using OOPSpam Anti-Spam
- Block entire countries from your site using Cloudflare firewall rules
- Combine segmentation and plugins for a more advanced setup
Let’s walk through each of these in detail.
1. Segment Subscribers by Country in MailPoet (WooCommerce Integration)
If you’re running WooCommerce alongside MailPoet, you can segment subscribers by country using data collected at checkout or registration.
How It Works
MailPoet offers country-based conditions for WooCommerce users. With this feature, you can create subscriber segments using filters like:
- “Country is”
- “Country is not”
- “Country is any of”
- “Country is none of”
By selecting “is in country”, you can segregate your customers by location. You can select from the conditions “any of” or “none of” to include or exclude countries.
This lets you:
- Target campaigns to specific countries
- Exclude subscribers from regions where your products or services aren’t available
- Refine your audience based on billing address country data
This method filters who receives your emails, not who can submit a form. It requires WooCommerce installed and integrated with MailPoet. It also doesn’t stop subscriptions from users in those regions.*
2. Block Country Submissions in MailPoet Forms with OOPSpam
If you want to prevent unwanted signups at the form level, the best way is to use a third-party plugin like OOPSpam Anti-Spam (that’s us 👋).
OOPSpam adds real-time spam filtering and allows you to block form submissions based on country, language, or suspicious behavior. It integrates with multiple form plugins, including MailPoet’s subscription forms.
What OOPSpam Adds to MailPoet
When connected, you gain:
- Country Filtering – Block or allow submissions based on location
- Language Filtering – Block form entries written in specific languages
- Machine Learning-Powered Spam Protection – Catch spammy patterns using machine learning
- Proxy, VPN, and TOR Blocking – Prevent anonymized or fake traffic
- Rate Limiting – Limit how often a form can be submitted
- Submission Logs – See what was blocked, when, and why
How to Set It Up
Step 1: Install the Plugin
From your WordPress dashboard: Go to Plugins > Add New, search for OOPSpam Anti-Spam, then install and activate it.
Step 2: Connect Your API Key
Create an account at OOPSpam.com, generate your API key
and paste it into OOPSpam > Settings in WordPress.
Step 3: Enable Spam Protection for MailPoet
Scroll to the MailPoet section in OOPSpam settings and toggle it on.
Step 4: Configure Country Rules
Choose whether to:
- Block submissions from specific countries, or
- Allow only submissions from selected countries
Save your settings, and OOPSpam will handle filtering at the form level.
Reviewing Blocked Submissions
OOPSpam gives you detailed logging, including:
- IP address
- Spam score
- Detection reason
- Country of origin
- Timestamp
You can monitor form activity and fine-tune your rules as needed, all from your dashboard
or the OOPSpam online portal.
3. Block Countries from Accessing Your Site with Cloudflare
If you’re experiencing broader abuse (e.g., fake signups, bot traffic, scraping), a more aggressive option is to block entire countries from accessing your website using Cloudflare.
This method stops traffic before it even hits your MailPoet forms, but it affects your entire site.
How to Block Countries with Cloudflare
- Log in to Cloudflare and choose your domain
- Navigate to Security > WAF > Firewall Rules
- Click Create Firewall Rule
- Name it “Block Countries”
-
Set the criteria:
- Field: Country
- Operator: is in
- Value: Select the countries to block
- Action: Block
- Save the rule
Traffic from those countries will now be blocked across your entire site, including all MailPoet forms and pages.
When to Use Cloudflare
- You’re under sustained bot attacks from a region
- You must comply with legal restrictions
- You want to reduce server load from irrelevant traffic
Cloudflare doesn’t give you form-level visibility like OOPSpam, but it’s effective for broad access control.
4. Combine MailPoet Segmentation + Plugins for Stronger Control
For the most control, consider combining: OOPSpam to prevent signups from unwanted countries and MailPoet segmentation to prevent email delivery to unwanted countries.
This dual approach allows you to:
- Block form submissions from specific countries
- Exclude certain regions from future email campaigns
- Fine-tune your targeting without sacrificing user experience
Important Considerations
- IP-based blocking isn’t perfect: Users can use VPNs or proxies to mask their location
- Manual upkeep: IP and country-based lists may need regular updates
- Always test thoroughly to make sure you’re not blocking real subscribers
What’s the Best Method for Country Blocking in MailPoet?
Method | What It Controls | Best For |
---|---|---|
MailPoet Segmentation (Woo) | Email audience | Targeted campaigns by country |
OOPSpam Plugin | Form submissions | Blocking fake or unwanted signups |
Cloudflare Firewall | Entire site access | Network-level blocking and compliance |
Combination (OOPSpam + Segments) | Both form + email delivery | End-to-end control for filtering and targeting |
Final thoughts
MailPoet doesn’t include built-in country-blocking for subscriptions, but that doesn’t mean you’re stuck. Using OOPSpam Anti-Spam, you can block form submissions from specific countries or languages. Pair it with MailPoet’s WooCommerce segmentation and Cloudflare’s firewall for full control over who can access your forms and receive your emails.