send.webforms.toRead the docs →

What Is a Honeypot Field?

A honeypot field is an input that is hidden from people but visible to automated scripts reading the HTML. A human never sees it and leaves it empty, so any submission that fills it in was almost certainly a bot.

It works because most form spam is not targeted. A script loads a page, finds every input, fills them all with plausible text and posts the result. It has no way of knowing that one of those inputs was never meant to be filled.

How you hide the field matters more than most guides admit. Using type="hidden" is the one approach that does not work, because scripts skip hidden inputs for exactly this reason. Moving it off screen with CSS works. So does a wrapper with display:none, at the cost of missing bots that render CSS.

The accessibility trap is worth knowing about. A field hidden with CSS is still in the accessibility tree unless you say otherwise, so a screen reader will announce it and a keyboard user can tab into it. Add tabindex="-1" and aria-hidden="true", or you have built a trap for the people you least want to trap.

A honeypot catches the cheap end of the spectrum and nothing else. Anything driving a real browser fills only the visible fields. Treat it as the free first filter, not the whole defence.

In WebForms

WebForms looks for a field named _gotcha by default. A submission that fills it is rejected before any other check runs, because there is nothing else worth spending time on.

More terms