A form without CAPTCHA. How I catch bots
enquiries per hour the server accepts from one IP address
In short
The form on my website has no CAPTCHA, no “select all the traffic lights”. Instead it has three quiet traps for bots that do not get in a person’s way at all. I show how they work, where their limits are, and what happens to an enquiry after it is sent.
Sooner or later every form on the internet is found by bots that fill the fields with ads and links. The most popular defence is CAPTCHA, but the customer pays for it: they have to click on pictures before they can even contact you. On a phone it can be annoying enough that someone just closes the page. I wanted the customer to have nothing to prove, with the protection working in the background.
Three traps instead of CAPTCHA
- A hidden field. The form has an extra field that a person cannot see. A simple bot fills in every field it finds in the page code. If that field arrives filled in, a person did not write it.
- A minimum time. The form remembers when it appeared. If less than 2.5 seconds pass between then and sending, the enquiry is dropped. A person cannot type a name, contact details and a message in two seconds; a bot does it instantly.
- A sending limit. The server accepts at most 5 enquiries per hour from one IP address. The sixth gets a message asking them to write by email instead.
One detail matters here: when a bot falls into the first or second trap, the server tells it “sent” but saves nothing. The bot does not learn it was rejected, so it has no reason to try a different way.
Checking the data on the server
What the browser checks is easy to get around, because data can be sent to the server without going through the page. So the server checks everything again: that the name has at least 2 characters, that the contact looks like an email address or a phone number (at least 9 digits), that the message has at least 10 characters and that the chosen service is one of those actually in the form. Every field also has a length limit, so nobody can paste several pages of text into it.
Where the limits are
I am not claiming this stops everyone. These traps filter out simple automated bots, and those are the majority. A person pasting an ad by hand gets through them just as they would get through a CAPTCHA. The sending limit is also best-effort: the server only remembers addresses for a while, so it is a brake, not a wall.
For a small business that is a sensible trade-off. If spam ever becomes a real problem, we have further steps, but we do not start by making life harder for customers.
What happens to an enquiry
- It is saved in a database on a server in Frankfurt, so inside the EU. Enquiries older than 12 months are deleted automatically, as stated in the privacy policy.
- A notification goes to my phone, but without personal data. It only says there is a new enquiry and which service it is about. The name and contact details stay in the database.
- If the database is briefly down, the form says so plainly instead of pretending the message went through. Nothing gets lost silently.
If your form collects spam or you are not sure enquiries reach you at all, get in touch. I can add a form like this to your site or check the one you already have.