Karachi, Pakistan Mon–Sat: 10AM–7PM PKT
Home Services
Design & Development
UI/UX Design Web Development WordPress Development Responsive Web Design Corporate Website Landing Pages / Microsites E-Commerce Solutions Mobile App Development
Marketing & Growth
SEO Services Content Marketing Social Media Marketing PPC / Google Ads Branding & Creative Speed & Performance
Hosting & Support
Web Hosting Maintenance & Support
Portfolio
Website Design Logo & Graphics
Clients About Blog Free Tools Get a Quote
Design & Build Guide

How to Stop Contact Form Spam Without Annoying Real Customers

Honeypots, time checks, Cloudflare Turnstile, reCAPTCHA v3, server validation, rate limiting and content filters, with code and WordPress plugin options.

Stop contact form spam: contact form protected from spam bots

To stop contact form spam without annoying real customers, combine several light defences: a hidden honeypot field that bots fill in, a minimum time check so the form rejects instant submissions, an invisible challenge such as Cloudflare Turnstile or reCAPTCHA v3, server-side validation and rate limiting, and optionally a spam filter such as Akismet. Visible puzzle CAPTCHAs should be a last resort, because they reduce genuine enquiries and are hard for some users. Also, this guide explains each method with code and WordPress options.

Key takeaways
  • Start with a honeypot and a time check; they stop most bot spam invisibly.
  • Add Turnstile or reCAPTCHA v3 if spam continues; both are usually invisible to humans.
  • Always validate on the server. Bots skip your JavaScript.
  • Human-written spam needs filters, rate limits and keyword rules, not CAPTCHAs.

Stop contact form spam: types of form spam

TypeSignsBest defence
Simple botsEvery field filled, instant submits, random textHoneypot, time check
Smarter botsRun JavaScript, mimic browsersTurnstile, reCAPTCHA v3, rate limiting
Human spam (SEO, marketing offers)Well-written pitches, real emailsAkismet, keyword and link rules, block repeat senders
Abuse of your form to send emailYour server sends spam to othersNever send the user's message to their own email automatically

Stop contact form spam: 1. Honeypot field

Then add a field that humans cannot see. Bots usually fill every input, so the server rejects any submission with a value:

<div class="hp" aria-hidden="true">
  <label for="website">Leave this empty</label>
  <input id="website" name="website" type="text" tabindex="-1" autocomplete="off">
</div>

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
<?php
if (!empty($_POST['website'])) { http_response_code(200); exit; } // pretend success

Hide it with CSS positioning rather than type="hidden", which bots recognise. Returning a normal success response stops bots from learning that they were caught.

2. Minimum time check

Humans take several seconds to fill in a form; bots submit instantly. Store the time the form was shown and reject submissions faster than about 3 seconds:

<?php
// When rendering the form
$_SESSION['form_t'] = time();

// When processing
if (time() - ($_SESSION['form_t'] ?? 0) < 3) { http_response_code(200); exit; }

A signed timestamp in a hidden field works too if you do not use sessions.

3. Cloudflare Turnstile or reCAPTCHA v3

Cloudflare Turnstile is free, privacy-friendly and usually invisible; it does not require using Cloudflare for your DNS. reCAPTCHA v3 gives each request a score from 0.0 to 1.0 without a puzzle, and you choose the threshold (0.5 is a common starting point).

Both require a server-side check of the token:

<?php
$res = file_get_contents('https://challenges.cloudflare.com/turnstile/v0/siteverify', false,
  stream_context_create(['http' => [
    'method'  => 'POST',
    'header'  => 'Content-Type: application/x-www-form-urlencoded',
    'content' => http_build_query([
      'secret'   => getenv('TURNSTILE_SECRET'),
      'response' => $_POST['cf-turnstile-response'] ?? '',
      'remoteip' => $_SERVER['REMOTE_ADDR'],
    ]),
  ]]));
if (!json_decode($res, true)['success']) { exit('Verification failed'); }

Keep the secret key on the server, never in the page.

4. Server-side validation and rate limiting

  • Validate every field on the server: required fields, length limits, a valid email format, a plausible phone number.
  • Reject messages with many links, or any links at all if your customers never send them.
  • Limit submissions per IP, for example five per hour, and block repeat offenders.
  • Strip HTML from messages and never use user input in email headers, which prevents header injection.

5. Content filters for human spam

  • Akismet (WordPress) checks submissions against a large spam database. It is free for personal sites and paid for commercial use.
  • Block common spam phrases ("SEO services", "guest post", "crypto") if they never appear in real enquiries.
  • Flag rather than delete, at least at first, so a genuine message is not lost.

Stop contact form spam: WordPress form plugins

PluginBuilt-in spam options
Contact Form 7reCAPTCHA v3 and Turnstile integrations, Akismet; honeypot via add-on
WPFormsAnti-spam token, Turnstile, reCAPTCHA, hCaptcha, Akismet, country and keyword filters
Gravity FormsHoneypot, reCAPTCHA, Akismet
Fluent Forms / FormidableHoneypot, Turnstile, reCAPTCHA, Akismet

Enable the honeypot first, then add one invisible challenge. Stacking several CAPTCHAs hurts real users more than bots.

Stop contact form spam: make sure real enquiries arrive

Spam filters on your inbox can also catch real form emails. Send form notifications through an authenticated SMTP service with SPF, DKIM and DMARC set (see our business email guide), store submissions in the database as a backup, and test the form monthly.

Stop contact form spam: frequently asked questions

Why am I still getting spam with reCAPTCHA?

Humans, or services that solve CAPTCHAs, send some of this spam. Add content filters and rate limits, and check that the token is verified on the server.

Do CAPTCHAs hurt conversions?

Visible puzzles can. Invisible options such as Turnstile, reCAPTCHA v3 and honeypots have little effect on genuine users.

Should I hide my email address on the site?

Bots harvest plain email addresses. A form or a WhatsApp button reduces this; see our WhatsApp button guide.

Related guides: Favicon Size Guide, Website Width and Common Screen Resolutions and Best Image Size for Websites.

For official guidance, see MDN Web Docs.

Spam taking over your inbox?

We build secure, spam-protected forms with reliable delivery as part of our web development and maintenance services. Contact us.

Written by the ItsWebExpert team, a web design and development company in Karachi building websites, online stores and apps for businesses across Pakistan.

Ask a Question on WhatsApp

Let's Build Your
Next Website

Tell us what you need and we will reply within 24 hours with honest advice and a fixed quote.

Trusted by our clients, rated 5.0 on Google

5.0 11 Google reviews Read all →
I had a great experience working with Waqas and his team. We got some website development and SEO work done, and I'm quite satisfied with the overall results. They understood our requirements, suggested improvements, and handled the work professionally. What I appreciated most was their communication, attention to detail, and willingness to make changes whenever needed. Waqas is very cooperative, and the team knows what they're doing. Definitely a good choice for anyone looking for reliable web development and digital marketing services.
HUHafiz Ubaid Google review · Nov 2026
I was referred to their company by someone, and I'm really glad I connected with them. Waqas, the CEO, is a very humble and professional person who leads his team exceptionally well. Their expertise in digital marketing, web development, and custom development services is impressive. The team is skilled, responsive, and committed to delivering quality work. Had a really positive experience working with them. Highly recommended!
MRMuhammad Rafeeq Google review · Nov 2026
I had hired them for my client's task of Custom Wordpress plugin development. and many other tasks later on.. Waqas is super fast and sharp.. I know him since 2019.. I really really appreciate his work. Highly recommended..
RFRaheela Farooqui Google review · Nov 2026
I had a positive experience working with Waqas and his team. They provided excellent support with graphic design and social media management. The team was professional, responsive, and attentive to our needs. They understood our vision and delivered quality work on time. Highly recommended for anyone looking for creative and reliable digital services.
URUsman Rock Google review · Nov 2026
I really appreciate their dedication and professionalism. They have a good understanding of SEO, social media marketing, and online brand growth. Communication is smooth, and the quality of work is impressive. Definitely a great team to work with!
SSSameer Sarafaraz Google review · Nov 2026
I've had a great experience working with their team. They understand digital marketing very well and know how to improve online visibility through effective SEO and marketing strategies. Professional, responsive, and reliable. Highly recommended! 🙌❤️
MNMohammad naveed Google review · Nov 2026
I had a really good experience with web Experts. Everything was easy to understand, well-organized, and user-friendly. I appreciate the effort and attention to detail that has gone into creating this platform. It was a smooth and pleasant experience, and I would definitely recommend it to others. Keep up the great work!
SSShazia shaikh Google review · Nov 2026
Extremely professional and committed I am Extremely happy to work with them I wish them best of luck Best Regards M. Salman Farooqui
SFSalman Farooqui Google review · Nov 2026
Outstanding experience! Quality, professionalism, and customer service are all excellent. Keep up the great work!
ARabdul rehman Google review · Nov 2026
Excellent service and a great experience. The team is professional, helpful, and dedicated. Highly recommended!
MEmustafa emb Google review · Nov 2026