DEV Community

Rahil Khan
Rahil Khan

Posted on

Your contact form is drowning in spam — add a honeypot field (no CAPTCHA needed)

Most small-business sites get buried in fake "inquiry" emails. A CAPTCHA slows real customers. A honeypot is quieter.

What to do

  1. Add a text field named something boring like company_url or website2.
  2. Hide it with CSS (position:absolute; left:-9999px or display:none — bots still fill it).
  3. On submit: if that field has any value, discard the message silently. Don't tell the bot it failed.

Real humans never see it. Spam drops hard. Optional: also rate-limit by IP if your host allows it.

Built this into client contact forms at NEXCOD when inbox noise was the complaint. Studio: https://nexcod.vercel.app · WhatsApp +1 289 902 5119

Top comments (0)