Where spam comes from
Most form spam is not people but programs. They scan the internet, find forms and submit links to dubious sites, promotion offers and meaningless text. No one warns you in advance: unwanted requests simply pile up in your inbox and CRM, managers spend time checking them and stop trusting incoming requests.
The second problem is more serious: an unprotected form can be used to send emails in the name of your domain. Then your email reputation suffers, and genuine emails to customers land in spam.
Layers of protection, from light to strict
Hidden honeypot field
A field invisible to people is added to the form. People do not fill it in, while programs fill in every field. If it is not empty, the request is discarded.
Fill-in time check
A person does not submit a form a second after the page loads. Submissions that are too fast are blocked.
Rate limiting
No more than a few requests per hour from one address. This also protects against mass attacks.
Server-side validation
All data is checked again on the server: phone format, length, forbidden characters. Browser-only checks are easy to bypass.
Invisible CAPTCHA
Modern solutions assess behavior and show a challenge only to suspicious visitors.
Content filter
Messages with links, repeats and stop words go to a separate folder for review instead of being deleted.
How not to harm real customers
- Do not make people solve pictures on every request
- Do not silently discard suspicious requests; keep them for a few days
- Test the form from a phone and on a slow connection
- Validate the phone number leniently: accept entries with spaces and brackets
- Do not complicate the form with extra fields; that lowers conversion more than spam does
- Once a week, look at the folder of rejected requests and find false positives
What else to protect besides forms
- Sign-up and login
- Limit the number of login attempts and enable a second check for administrators.
- Comments and reviews
- Moderation before publishing and a ban on links for new users.
- Newsletter subscription
- Double opt-in protects against other people's addresses and spam complaints.
Form spam is also a reason to check security
If the form sends emails, make sure the recipient address cannot be substituted through the form fields. This is a common vulnerability in old scripts, and it is how spam gets sent through a site.
How to choose a CAPTCHA
Invisible CAPTCHAs from large providers handle bots well, but they pass visitor data to third-party services. This needs to be reflected in your privacy policy and in the consent to personal data processing.
If your audience is privacy-sensitive or you need data stored in Kazakhstan, solutions without external services will work: honeypots, rate limits and server-side validation cover most threats. For high-traffic sites, network-level protection is added.
How to tell the protection is set up correctly
After setup, send a few test requests from a phone and a computer: a normal one, a very fast one, and one with a link in the text. The first should get through, and the other two should end up in the rejected log. If real requests suffer, relax the rules and watch the statistics.
After a week, compare the number of requests and the share of spam. The goal is not zero spam at any cost, but for managers not to waste time on junk and not to miss customers. A small amount of spam getting past the protection is better than a lost real request.