
Have you ever received strange or unwanted messages through your WordPress contact form? These spam messages can be annoying, time-consuming, and even harmful. This spam happens when bots or spammers flood your forms with fake messages, links, or advertisements. It can slow down your website, fill your inbox with useless emails, and pose security risks. If left unchecked, it can affect your site’s performance and make it harder for real visitors to contact you. This is why preventing WordPress contact form spam is important – it keeps your site secure, improves user experience, and ensures your contact form works properly.
In this tutorial, we show you how to use the WPForms plugin to explore the best ways to stop spam before it reaches you. This plugin offers built-in spam protection, including reCAPTCHA, anti-spam protection, and blocklists, making it easy to keep your forms safe.
KEY TAKEAWAYS
- Spam bots can flood your WordPress contact forms with fake messages, making it harder to find real inquiries.
- WPForms has built-in spam protection tools to block bots automatically.
- Adding Google reCAPTCHA or hCaptcha helps confirm that only real people can submit your form.
- Use Akismet or CleanTalk to filter out spam messages before they reach your inbox.
- Disabling copy-paste and autofill makes it harder for WordPress contact form spam bots to submit fake entries.
- Set a minimum time requirement to stop bots from submitting forms instantly.
- Block certain countries or IP addresses to prevent spam from known sources.
- Filter email submissions with allowlists and denylists to ensure only trusted users can send messages.
- A profanity filter keeps messages clean and professional.
- Install anti-spam plugins to add extra protection against new spam techniques.
- AI-powered spam detection tools help catch spam that traditional filters might miss.
- Use multiple spam prevention methods to get the best protection while keeping the form easy for real users.
TABLE OF CONTENTS
Common Types of WordPress Contact Form Spam
Spam can appear in different forms, so understanding them helps you stop it before it becomes problematic. Let’s look at the most common types of contact form spam that affect WordPress websites.
Spam Bots
Spam bots are small programs designed to fill out and submit forms automatically. They crawl the internet, looking for contact forms to target. Once they find one, they send fake messages, often containing random text, links, or advertisements.
These bots work fast, submitting spam to hundreds or thousands of websites within minutes. Because they are automated, they don’t need a human to type the messages, making them one of the largest spam sources. WPForms has built-in tools such as modern anti-spam protection and reCAPTCHA that can block these bots before they submit anything.
Manual Spam
Not all spam comes from bots. Some spammers manually fill out forms to send fake messages. These messages often promote products, services, or scams. Some try to trick you so that you click on a false link or provide sensitive information.
Because real people submit these messages, they can sometimes bypass basic spam filters. This is why extra security measures, such as blocking spam keywords and requiring email confirmation, can help reduce manual spam.
Link Spam
Link spam happens when spammers add harmful or promotional links in form submissions. These links can lead to scam websites, phishing pages, or malware-infected sites. Some spammers also try to use your contact form to post backlinks, hoping it will boost their site’s search rankings.
Clicking on these links can be dangerous, as they can steal your data or install harmful software on your device. To stop this type of spam, set up word filters in WPForms to block certain keywords or URLs. You can also restrict the number of links users can submit in a form.
Once you understand these types of contact form spam, you can take the right steps to protect your WordPress site. In the coming sections, we explore the best ways to block spam and secure your forms using WPForms.
Tips to Stop WordPress Contact Form Spam
In this section, we show you how to stop spam on WordPress contact forms using the following methods:
- Enable WPForms Anti-Spam Protection
- Integrate Akismet Anti-Spam Protection
- Implement CAPTCHA Solutions
- Restrict Submissions by Country
- Block Spam IP Addresses
- Configure Spam Filters
- Block Copy-Paste Submissions
- Use AI for WordPress Contact Form Spam Detection.
Enable WPForms Anti-Spam Protection (Built-in Feature)
Spam bots always search for ways to submit fake messages through your contact forms. To stop them, WPForms has a built-in anti-spam protection feature that blocks spam before it reaches you.
This hidden security feature works in the background and adds a special code to each form submission. When someone fills out your form, WPForms checks this code to ensure the request comes from a real visitor, not a bot. How does it do this?
WPForms does this using a combination of anti-spam tokens, honeypots, and JavaScript validation. Here’s how it works when you enable WPForms anti-spam protection:
Anti-Spam Token System
WPForms generates a unique token for each user when they load a form. This token is invisible and works in the background. When someone submits your form, WPForms checks whether the token is valid. If it’s missing, expired, or incorrect, the submission is likely from a bot and is rejected. Since bots usually bypass the form and try to submit data directly, they don’t generate a valid token, which helps detection.
JavaScript-Based Validation
The anti-spam feature requires JavaScript to work correctly. Real users usually have JavaScript enabled, while many bots don’t process JavaScript properly. If it’s disabled or missing, WPForms sees this as a red flag and may block the submission. This helps filter basic WordPress contact form spam bots that don’t interact with JavaScript elements.
Honeypot Protection (Hidden Fields for Bots)
WPForms also includes a honeypot field, which is invisible to human users but visible to bots. If a bot fills out this hidden field, WPForms automatically marks the submission as spam. Since real users can’t see or fill in the honeypot field, they are not affected.
Now that you know how anti-spam protection works, let’s see how to enable this:
Login to your WordPress dashboard. Navigate to WPForms → All Forms. Locate your form and click Edit.

Once the form is opened, go to Settings → Spam Protection and Security. Now, find Enable modern anti-spam protection and turn it on. This is usually on by default, but it’s a good idea to check. Lastly, click Save.

Once enabled, WPForms will automatically check every form submission for spam and block fake entries. Since this is a built-in feature, it works without slowing down your site or affecting real users.
Integrate Akismet Anti-Spam Protection
Akismet is an advanced anti-spam service. It’s great for preventing spam comments but also works with contact forms when integrated with WPForms. It works by analyzing form submissions and comparing them against a massive spam database. It helps stop spam bots, fake messages, and suspicious submissions, reducing the time you spend deleting spam manually.
To use Akismet for blocking WordPress contact form spam, follow these steps: First, install and activate the Akismet Anti-Spam plugin and copy your API key.

Once you have installed and set up the Akismet plugin, the next step is to integrate it with your forms. To get started, create a new form or edit an existing form in WPForms.

Once the form builder is open, go to Settings → Spam Protection and Security. In the right-hand panel, locate Enable Akismet anti-spam protection and toggle it on. This feature ensures that WordPress contact form spam submissions are automatically detected and managed.

WPForms also allows you to manage spam. If you enable Store spam entries in the database, Akismet will collect spam submissions rather than blocking them immediately. This lets you review suspected spam messages later. However, if you disable the spam storage option, Akismet will automatically block spam submissions, preventing them from reaching your WordPress database.

To further prevent spam bots, you can enable minimum time to submit and specify the number of seconds. This setting requires users to spend the specified minimum time on the form before submitting, helping to filter out automated bot submissions.

Once you have configured the spam protection options, click Save to apply the changes.

Remember, with Akismet enabled, any submission marked as spam by the system will not be saved unless you choose to store spam entries for later review. This ensures that only genuine form submissions reach your inbox.
Implement CAPTCHA Solutions
Another way to stop WordPress contact form spam is by using CAPTCHA solutions. CAPTCHA stands for Completely Automated Public Turing Test to Tell Computers and Humans Apart. It helps block spam by making users complete a simple test before submitting a form.
Fortunately, WPForms supports multiple CAPTCHA solutions to keep your contact forms secure. Let’s explore 3 popular options:
- Google reCAPTCHA
- hCaptcha
- Cloudflare Turnstile.
Google reCAPTCHA
Google reCAPTCHA helps websites tell the difference between real users and bots. It comes in 3 types:
- reCAPTCHA v2 (Checkbox): Users check a box that says, I’m not a robot.
- Invisible reCAPTCHA: No checkbox; it runs in the background and verifies users automatically.
- reCAPTCHA v3: Works silently without user interaction; it gives a spam score to detect suspicious activity.
Here’s how to add Google reCAPTCHA to WPForms:
First, sign in to your Google account. Next, go to Google reCAPTCHA Admin Console to create a captcha. Type in a name for your reCAPTCHA (e.g., My Website reCAPTCHA). Choose reCAPTCHA type. Then, enter your website domain name.

After that, specify the project name for the Google Cloud Platform. Accept the terms and click Submit to complete the registration.

You will then see Site Key and Secret Key, which you’ll need to add reCAPTCHA to your WordPress forms. So, keep the tab open or copy these keys in a text file.

Now, go to WordPress Dashboard → WPForms → Settings. Click CAPTCHA and select Google reCAPTCHA.

After that, scroll down a little. Choose your type of CAPTCHA and fill in the Site Key and Secret Key you generated earlier. Lastly, click Save Settings.

Now, you need to enable Google reCAPTCHA in your contact form. To do that, open WPForms → All Forms and open your desired contact form in the editor. Click Settings → Spam Protection and Security. Turn on Enable Google Checkbox v2 reCAPTCHA (this option will differ based on your CAPTCHA type) and click Save to apply the changes.

Now, reCAPTCHA will protect you from WordPress contact form spam bots while allowing real users to submit messages easily.
hCaptcha
hCaptcha is a privacy-friendly alternative to Google reCAPTCHA. It blocks contact form spam bots while respecting user privacy. Instead of using Google’s tracking system, hCaptcha works independently and is GDPR-compliant, making it a great choice for privacy-conscious users.
Here’s how to set up hCaptcha in WPForms:
Go to the hCaptcha website and sign up for a free account.

Once you’re in, click Generate to get your site keys. Ensure you save them in a text file for later use. Then, click Continue to move to the next step.

Click Add Site to register your website.

Fill in Name by providing a reference for a site or site key (in our example, we provided the site key we generated in the previous step).

Then, enter your domain name.

Choose an hCAPTCHA challenge behavior of your choice and click Save.

Next, go to WPForms → Settings in your WordPress dashboard. Click CAPTCHA. Select Captcha.

Then, enter your site and secret keys and click Save Settings.

Now, open your form by navigating to WPForms → All Forms. Click Settings → Spam Protection and Security. Toggle on Enable hCaptcha and click Save to save your settings.

hCaptcha will now protect you from WordPress contact form spam bots, just like Google reCAPTCHA, but with stronger privacy controls.
Host your WordPress site securely with Hosted®, where our advanced security features like DDoS protection and daily backups protect your data.
Focus on growing your site while we handle the security and performance for you.
Cloudflare Turnstile
Cloudflare Turnstile is a new CAPTCHA alternative that works without frustrating users. Unlike traditional CAPTCHAs, it doesn’t ask users to solve puzzles or click on images. Instead, it verifies them silently using browser behavior and security checks.
Here’s how to add Cloudflare Turnstile to WPForms: Go to the Cloudflare Turnstile page and click Get Started for free to create a Cloudflare account. You can click on Log in if you already have an account.

Once you’re in, you’ll see the following screen. Click Add Widget to add a site.

Write your widget name to identify it in the future. Click + Add Hostnames to specify the domain name.

After that, choose Widget Mode and click Create.

Now, you’ll see the Site Key and Secret Key. Copy them into a file for later use.

Next, to enable Turnstile in WPForms, go to WPForms → Settings → CAPTCHA tab. Select Cloudflare Turnstile, enter your API keys, and click Save Settings.


Now, it’s time to activate Turnstile in your contact form. Go to WPForms → All Forms and select your form. Click Settings → Spam Protection and Security. Turn on Enable Cloudflare Turnstile and save your form.

Now, Turnstile will quietly protect your contact forms from spam without making users solve annoying tests.
Use Custom CAPTCHA Fields
WordPress contact form spam bots are designed to fill out forms automatically, but adding a custom CAPTCHA field makes it harder for them to get through. Unlike standard CAPTCHA tools like Google reCAPTCHA, custom CAPTCHA fields let you create challenge questions that only real users can easily answer.
A custom CAPTCHA field is a simple question or challenge a visitor must answer before submitting a form. Since spam bots can’t think like humans, they often fail these challenges, which helps keep your form free from fake submissions.
To create an effective custom CAPTCHA, you need a question that is easy for humans but difficult for bots. Here are some good examples:
- Math Questions: What is 5 + 3? or Solve 10 – 4.
- Simple Word Questions: Type the word “blue” in the box.
- Logic Questions: Which number is bigger, 2 or 9?
- Multiple-Choice Questions: Pick the number seven from the list: 3, 7, 1, 5.
Since bots are not programmed to answer such questions correctly, these fields help block automated WordPress contact form spam effectively.
Here’s how you can add a custom CAPTCHA field in WPForms: Go to your WordPress dashboard. Click WPForms → All Forms. Select the form to add CAPTCHA protection. In the form editor, click Add Fields. Drag and drop Single Line Text or Multiple Choice into your form.

Then, click on the new field to open the field editor. Change the field label to a custom CAPTCHAquestion and update the choices. You can also add or remove the choices as per your requirements.

Next, set the field as Required so users must answer before submitting. Additionally, provide a correct answer under Description to help users if needed.

Lastly, click Save in the top-right to apply changes.
IMPORTANT:
For the best results, you may use CAPTCHA along with Akismet, WPForms’ built-in spam protection, and custom CAPTCHA fields. This way, you can keep your contact form secure while making it easy for real visitors to reach you.
Restrict Submissions by Country
You can also restrict WordPress contact form spam submissions by country. This method is helpful if your business only serves customers from certain countries or if you frequently receive spam from specific locations. Here’s how to restrict a country using WPForms:
Open your required form in the editor. Then, go to Settings → Spam Protection and Security and do the following:
- Activate Enable country filter.
- Select Allow from the Country Filter dropdown.
- Choose one or more countries.
- Optionally, you can also update the Country Filter Message.
Then, click Save to save your preferences.

While here, you can also toggle on Enable keyword filter and click Edit keyword list to provide the keyword filter list. Using this feature is particularly useful for blocking profanity in form submissions.

Block Spam IP Addresses
WordPress hackers and contact form spam bots often use specific IP addresses to flood your contact forms with fake messages. In this case, blocking spam IP addresses is a simple but effective way to stop these bad actors from submitting forms on your website.
However, before blocking an IP, you need to identify suspicious activity. Here’s how:
Go to WPForms → Entries in your WordPress dashboard. Look for repeated spam submissions coming from the same IP address. Copy the IP addresses of all the spammy submissions.

Then, go to WordPress Dashboard → Settings → Discussion in the left-hand menu. In Disallowed Comment Keys, enter the IP addresses you want to block, ensuring each IP is on a separate line.

Once done, page down and click Save Changes.
Furthermore, if you’re using WordPress Hosting from Hosted®, you can block IP addresses from your cPanel. To do that:
Sign in to the Hosted® cPanel, head to Security, and click IP Blocker.

Enter the spam IP address or range to block multiple IPs. Then, click Add to save the blocklist.

From now on, blocked IPs cannot access your entire website, not just your forms.
TIP: You can also refer to the tutorial, How To Use The cPanel IP Blocker, to explore cPanel’s IP Blocker feature.
Configure Spam Filters
Spam filters help you control who can submit messages through your WordPress contact form. By using allowlists and denylists, you can decide which email addresses or domains are allowed and which are blocked. This method is useful to stop WordPress contact form spam while ensuring real users can still reach you.
Here’s how to do it: Open your contact form in the editor that you want to protect. Click Fields, then Email in the form editor.

Next, click Email to open the field editor. Switch to Advanced. Scroll down to find Allowlist / Denylist. To allow only certain emails, enter them in the allowlist (e.g., *@yourcompany.com).
Enter domains in the denylist (e.g., *@spam.com) to block spam emails. You can also block temporary emails like *@tempmail.com or *@10minutemail.com. Lastly, click Save and submit a test form using a blocked email to ensure the filter works.

Now, WPForms will reject submissions from blocked emails and only accept allowed emails if an Allowlist is set up.
You can also activate Enable Email Confirmation under General if your form submissions are from invalid or spammy emails.

Block Copy-Paste Submissions (Disable Autofill)
Some manual spammers and WordPress contact form spam bots often use copy-paste and autofill to submit spam messages on your contact forms quickly. By disabling this, you can reduce spam and encourage real users to type their details manually. This method helps keep your form entries clean and authentic.
Here’s how to disable copy-pasting in WPForms using JavaScript:
In the form editor, click Fields and then HTML.

Then, click on the field and paste the following JavaScript code inside Code. Ensure you fill in Label to name this HTML block. It will help you identify the in-form builder. Then, click Save.
<script>
document.addEventListener("DOMContentLoaded", function() {
let fields = document.querySelectorAll("input[type='text'], input[type='email'], textarea");
fields.forEach(function(field) {
field.addEventListener("paste", function(event) {
event.preventDefault();
alert("Copy-pasting is disabled for this field. Please type your response.");
});
field.addEventListener("copy", function(event) {
event.preventDefault();
alert("Copying is not allowed.");
});
});
});
</script>

This above script detects all text input fields (including name, email, and message fields) and prevents pasting into these fields, ensuring users enter information manually. If someone tries to copy or paste, they see an alert saying: Copy-pasting is disabled for this field. Please type your response.

IMPORTANT:
Spam messages may get through, even with built-in spam protection in WPForms. That’s why using dedicated anti-spam plugins is important to add an extra security layer to your contact forms. These plugins help detect, filter, and block WordPress contact form spam automatically, reducing unwanted submissions. Popular options include Antispam Bee and Spam protection, Anti-Spam, FireWall by CleanTalk.
Use AI for WordPress Contact Form Spam Detection
Spam bots are becoming smarter, making it harder to block them using simple filters or CAPTCHAs. This is where artificial intelligence (AI) comes in. AI-powered spam detection can analyze form submissions in real time, identify spam patterns, and block unwanted messages automatically.
AI spam detection works by learning from past spam entries and using that knowledge to filter out suspicious messages. Instead of blocking specific words or IP addresses, AI looks at multiple factors, such as message structure, language, and sender behavior, to determine if a submission is spam. This makes AI-powered spam filters more accurate and adaptable than traditional methods.
Multiple WordPress anti-spam plugins use AI to identify and block spam effectively. Akismet is one of these. It scans form submissions (when integrated with WPForms), blog comments, and user messages in real time, checking them against its global spam database. So, ensure you use a dedicated anti-spam plugin to avoid WordPress contact form spam submissions.
![Stay secure with Hosted®’s WordPress Hosting. Strip Banner Text - Stay secure with Hosted®’s WordPress Hosting. [Get started]](https://www.hosted.com/articles/wp-content/uploads/2025/02/wordpress-contact-form-spam-2.webp)
FAQS
What are the most effective ways to prevent contact form spam in WordPress?
The best way to stop spam is to use multiple layers of protection. Relying on just one method, like CAPTCHA, may not be enough. Instead, combining built-in WPForms anti-spam tools provides stronger security. Also, AI-powered spam detection and dedicated anti-spam plugins like Akismet ensure a more advanced filtering system.
How does spam affect my website’s performance and security?
Spam can slow down your website, overload your email inbox, and expose your site to security threats. If too many spam messages are submitted, they can increase server load, affecting site speed. Some spam submissions also contain malicious links or phishing attempts, putting your data and users at risk. Therefore, blocking spam at the form level can protect your site from these threats and ensure a smooth user experience.
What is the difference between spam bots and manual spam submissions?
Spam bots are automated programs that crawl the web and submit fake messages to contact forms. They often send bulk spam within seconds. With manual spam, real people manually fill out forms with promotional content, phishing links, or scam messages. Because these messages are typed by humans, they can sometimes bypass spam protection.
Can AI be used to prevent spam in contact forms?
Yes. AI-powered spam detection is one of the most advanced ways to prevent spam. It can analyze form submissions in real time, detecting patterns indicating spam. AI-powered plugins use machine learning to identify and block new spam techniques, so are more effective than traditional spam filters. AI can also reduce false positives, ensuring real users can submit forms without issues.
How can I test if my spam protection methods are working?
You can test if your spam protection methods are working by submitting a fake message. If it goes through, enable the minimum submission time feature. Use spam words like “free money” to check filtering, and test with a spammy email domain to see if it’s blocked. You can also use a spam bot simulator to evaluate bot protection strength. Regular testing ensures spam filters work without affecting real users.
Other Tutorials of Interest
– How to Stop WordPress Comment Spam: 4 Effective Strategies
– WordPress Blocks Features and Site Customization Options
– How To Unpublish A WordPress Site: 3 Easy Ways
– WordPress Widgets: How To Add & Use Them For Maximum Impact
– How To Create A Custom WordPress Author Page