How to block countries in ACF Frontend Forms?

Advanced Custom Fields

Advanced Custom Fields (ACF) Frontend Forms cannot block countries on their own. To filter submissions by location, you must use a third-party anti-spam plugin like OOPSpam or apply network-level rules through tools like Cloudflare. The simplest and most effective method is OOPSpam because it blocks only the form, not your entire website.

You need country blocking in ACF because spam attacks now rely heavily on VPNs, proxies, and automated bots. This guide explains each method clearly and shows the easiest approach for ACF users.

Method 1: Use OOPSpam Anti-Spam (Form-Level Country Blocking)

OOPSpam Anti-Spam is the strongest option for ACF forms. It blocks spam before WordPress saves the submission. It offers:

This method targets only the form. Your site stays accessible.

How to Set Up OOPSpam for ACF Frontend Forms

Below is the full, simple process based on the provided instructions.

1. Install the Plugin

OOPSpam Anti-Spam plugin

Go to Plugins → Add New and search for OOPSpam Anti-Spam. Install and activate it.

2. Create Your OOPSpam Account

OOPSpam dashboard

Go to OOPSpam.com and create an account. Copy your API key from your dashboard.

3. Paste the API Key in WordPress

Paste the API Key in WordPress

Go to OOPSpam → General Settings. Paste your API key into the “My API Key” field. Adjust the sensitivity slider. Moderate is recommended.

4. Enable ACF Form Protection

Turn on spam protection for ACF Frontend Forms

Inside OOPSpam settings, turn on spam protection for ACF Frontend Forms. This ensures all ACF forms are screened.

5. Set Up Country Filtering

Set Up Country Filtering

Under OOPSpam → Settings, scroll down to Country Filtering. You’ll see three options:

Select the countries you want to allow or block, then click Save changes.

OOPSpam will now filter ACF Frontend Form submissions using IP geolocation, spam signals, and behavior patterns.

Turn on extra filtering:

This lowers spam dramatically while keeping real engagement high.

Alternative Method: Use Cloudflare Firewall Rules (Site-Wide Blocking)

Use Cloudflare if you want broader protection. This method blocks the entire site for certain countries, including the form pages.

Use Cloudflare Firewall Rules (Site-Wide Blocking)

Steps:

  1. Log in to Cloudflare.
  2. Go to Security → WAF → Firewall Rules.
  3. Create a rule:
    • Field: Country

    • Operator: is in

    • Action: Block

  4. Save and deploy.

When to use this:

Note: This blocks all visitors from those countries, not just the form.

Other Options: WordPress Security Plugins or Hosting Tools

Plugins like Wordfence and hosting firewalls can block countries by IP range. These methods:

They are useful only if you need simple, broad blocking.

Final Thoughts

If you use ACF Frontend Forms, the most effective setup is: Use OOPSpam Anti-Spam for form-level filtering + Use Cloudflare Firewall Rules for network-level protections. This two-layer approach matches today’s spam trends. It gives clean submissions, strong security, and minimal impact on real users.

Spam Protection for WordPress, Zapier, Make and more.

Since our launch in 2017 we’ve been perfecting our API to be the trusted option for small businesses to enterprise— and continue to stick to our values of being the accessibility and privacy-friendly option. Give us a shot!

Try OOPSpam for free → Try our WordPress plugin for free →

✓ No credit card required ✓ Cancel anytime

Enjoy Reading This Article?

Here are some more articles you might like to read next: