Home › Knowledgebase › KB-1161

Why Your Website Contact Form Is Sending Spam and How to Stop It

Summary

This guide helps you troubleshoot and resolve: Why Your Website Contact Form Is Sending Spam and How to Stop It. Follow the steps below to fix the issue.

Quick Tip: Need immediate assistance? 💻 Open a Ticket

Common Causes

Your website contact form is designed to capture genuine enquiries from customers, but it can also become a target for automated bots. When spammers exploit your form, they can send high volumes of junk messages through your server, which may result in your domain being blacklisted and your legitimate emails landing in spam folders. This guide explains how to identify form abuse and secure your website against automated attacks.

Warning: Do not publish email addresses in plain text on your website. Spambots scrape pages for visible email addresses. Instead, use a contact form or obfuscate email addresses using JavaScript or an image.

Slug

why-your-website-contact-form-is-sending-spam-and-how-to-stop

Quick Fix Steps

  1. Log in to your website admin dashboard and review all recent form submissions.
  2. Delete any obvious spam entries and note the IP addresses or email patterns used.
  3. Install or enable a CAPTCHA solution or spam filtering service on your contact form.
  4. Apply rate limiting to restrict the number of submissions per IP address within a set timeframe.
  5. Test the form by submitting a genuine enquiry to confirm it still works.
  6. Monitor your email delivery and spam folder over the next 24–48 hours.

Detailed Instructions

Identify Spam Submissions

  1. Open your website admin panel and navigate to the contact form or messages section.
  2. Look for submissions containing random characters, multiple links, or generic text such as "Great post!" or "Contact me about SEO services."
  3. Check the submission timestamps. Bots often send multiple entries within seconds or minutes of each other.
  4. Export the submission list if your platform supports it, so you can analyse patterns in IP addresses or email domains.

Add CAPTCHA Protection

  1. For WordPress sites, go to Plugins > Add New and search for a reputable CAPTCHA plugin such as reCAPTCHA or hCaptcha.
  2. Install and activate the plugin, then follow the setup wizard to obtain API keys from Google reCAPTCHA or hCaptcha.
  3. Edit your contact form page and add the CAPTCHA field to the form.
  4. Save the form settings and test by attempting a submission without completing the CAPTCHA. The submission should be blocked.
  5. For non-WordPress sites, add the CAPTCHA script provided by your service to your form HTML, usually just before the closing form tag.

reCAPTCHA v2 vs v3

Accessibility warning: CAPTCHA challenges can create barriers for users with disabilities, particularly those using screen readers or with visual or cognitive impairments. Where possible, use invisible reCAPTCHA v2 or v3, and provide an alternative contact method such as a telephone number or email form that does not rely on visual challenges.

Enable Honeypot Fields

  1. A honeypot is a hidden field that humans cannot see but bots often fill out automatically.
  2. In your form builder settings, look for an option labelled Enable Honeypot, Anti-spam field, or similar.
  3. Activate the option and save your form.
  4. Test the form to ensure genuine submissions still go through while bot submissions are rejected.

Use Spam Filtering Services

  1. As an alternative to CAPTCHA, consider Akismet or a similar spam filtering service.
  2. For WordPress, install the Akismet plugin from Plugins > Add New and activate it with an API key.
  3. Configure the service to scan contact form submissions for spam characteristics before they reach your inbox.

Apply Rate Limiting

  1. Rate limiting restricts how many times a single IP address can submit your contact form within a set period, such as five submissions per hour.
  2. In your form plugin or security plugin settings, locate Rate Limiting, Submission Limits, or Brute Force Protection.
  3. Set a maximum number of submissions per IP address per hour or per day.
  4. Save the settings and test that genuine users can still submit the form without being blocked.

Keep CMS and Plugins Updated

  1. Outdated content management systems and form plugins often contain security vulnerabilities that bots can exploit.
  2. For WordPress, go to Dashboard > Updates and install any available updates for WordPress core, themes, and plugins.
  3. Enable automatic updates for minor plugin releases where supported.
  4. After updating, test your contact form to ensure it still functions correctly.

Review Email Sending Settings

  1. Ensure your website is not using the default PHP mail() function to send form notifications, as this is easily abused.
  2. Configure your site to send emails via SMTP using your mail credentials or a dedicated transactional email service.
  3. For 220 Internet Services hosting, your mail credentials are located in your hosting control panel under Email Accounts > Manage > SMTP Settings. Note the SMTP server address, port, username, and password.
  4. In your website admin, navigate to Settings > Email or SMTP and enter your mail server details.
  5. Save the settings and send a test email to confirm delivery.

Australian Small Business Context