Spam Protection
Published: 27-Jul-2026

How to Stop Spam on Your Contact Form Without a Backend Server

Stop contact form spam without running CAPTCHA servers or writing filter scripts. Use honeypots, rate limits, spam scoring, and optional CAPTCHA via a form endpoint.

MFC

MyFormConnect Team

Contact form spam is a genuine problem — bots submit tens of thousands of messages per day to unprotected forms. But solving it doesn't require running a CAPTCHA verification server or writing custom filter scripts. This guide explains how spam protection actually works and how to set it up on a form that runs no backend code of its own.

Why browser-side checks can't stop spam

HTML5 required attributes, JavaScript validation, and even hidden fields are easily bypassed. Automated scripts submit HTTP requests directly — they don't render your page or run your JavaScript at all. Any check that runs in the browser is visible to the attacker and trivially circumvented.

Effective spam filtering requires server-side logic: access to request metadata, IP reputation data, rate limiting, and secrets that cannot be exposed in the page source.

Running filtering without your own server

The practical approach is to post your form to an endpoint that handles filtering for you. Your site stays static; the endpoint at MyFormCapture receives the POST and applies multiple layers of checks before storing or discarding a submission. You configure the protection level in the dashboard.

Technique 1: Honeypot fields

A honeypot is a form field that is hidden from human visitors using CSS, but bots that auto-fill all fields will complete it. When the endpoint receives a submission with the honeypot field filled, it silently discards it — the submitter never knows.

To add a honeypot manually to your form:

<!-- Hide this with CSS, not display:none alone -->
<div style="position:absolute; left:-9999px; height:0; overflow:hidden;" aria-hidden="true">
  <label for="website">Leave this blank</label>
  <input id="website" name="website" type="text" tabindex="-1" autocomplete="off" />
</div>

When using a form backend, enable the built-in honeypot instead of adding this yourself — the endpoint generates and checks a cryptographically named field that's harder for modern bots to identify.

Technique 2: Timing checks

Genuine visitors take at least a few seconds to read the form and type a message. Bots that fill fields programmatically can submit in milliseconds. The endpoint records a timestamp when the form page is loaded and rejects submissions that arrive too quickly — typically under one second.

This requires no JavaScript on your part. It's handled entirely by the endpoint when it processes the submission.

Technique 3: Content and IP scoring

Each submission is scored based on signals including:

  • Number of links in the message body (spam often includes multiple URLs)
  • Known spam phrases and keyword patterns
  • IP address reputation against blocklists
  • Consistency of field values (a "name" field containing an email address is suspicious)

Submissions above a score threshold are either quarantined for review or silently discarded, depending on your settings.

Technique 4: Rate limiting

Rate limits prevent an attacker from submitting hundreds of messages in a short period — even if each individual submission passes other checks. Rate limits are applied per IP address and optionally per browser fingerprint. Configure the limit in your form settings based on your expected legitimate traffic.

When to add CAPTCHA

CAPTCHA adds a challenge that requires human interaction before submission. It's effective, but it also creates friction for genuine visitors — some will abandon the form rather than complete the challenge.

Use CAPTCHA when:

  • Your form is receiving a high volume of spam that passes all the invisible layers
  • The form collects high-value submissions that justify some extra friction
  • You're running a public-facing campaign that attracts targeted spam

Don't enable CAPTCHA by default on every form. Most contact forms handle spam adequately with honeypot + timing + scoring — CAPTCHA is a tool for when those aren't enough.

When you do enable CAPTCHA, use the integration built into the endpoint rather than verifying tokens yourself. The endpoint handles the server-side token verification so you don't have to write that code.

A word on blocking disposable email addresses

It's tempting to block disposable email domains as another layer of filtering. Be careful — some legitimate users, particularly privacy-conscious ones, use disposable addresses intentionally. Blocking them too aggressively creates false positives and can exclude valid enquiries. Content scoring and rate limiting are safer first layers.

What not to do

  • Don't put API keys or CAPTCHA secrets in client-side JavaScript — anyone can read your page source
  • Don't rely solely on required attributes — bots don't run your HTML validation
  • Don't use display:none alone for honeypot fields — some bots skip fields with that style
  • Don't block entire countries by IP — legitimate customers travel and use VPNs

How much protection you actually need

Most contact forms are adequately protected by a honeypot, a timing check, and basic content scoring. That combination handles the vast majority of automated submissions without any visible friction for real visitors. CAPTCHA and manual review are tools for when those layers aren't holding — not for every form by default.

The advantage of endpoint-level protection is that you can adjust it without deploying a new version of your site. If a form starts attracting targeted spam, tighten the settings in the dashboard and the change takes effect immediately.

Ready to collect form submissions?

Create a free MyFormCapture form endpoint and skip building your own backend.

Start Free Trial

No credit card required · 5-minute setup