Sep 04, 2023 Rob Harris

How to stop getting spam from my website

Is your work inbox filling up with spam emails? You’re not alone. It’s estimated that 48% of all emails sent are spam. When your email address features on your company website, this is likely to increase.   

If you would like to minimise the amount of spam you get from your website, read on.




Change direct emails addresses on your website 

When your email is written directly on your website like spam bots from around the web will go to your website and scan the text for email addresses such as this. You can change the linked text to something like email us instead of your email address or completely remove it and replace it with a form. 


Use reCAPTCHA from Google on your website  

By using reCAPTCHA, you can help to protect your website forms from being filled out by spam bots. 

There are multiple versions you can choose from. Version 2 reCAPTCHA requires your users to click on images that match the name as shown below.Google recaptcha puzzle example

For instance, here Version 2 asks the user to select pictures with coffee before submitting the form.

Version 3 allows your reCAPCHA to remain ‘invisible’ which means your users won’t have to do anything. Instead, you will see the badge on the bottom right of your website when installed correctly. 

Google recaptcha widget


To install reCAPTCHA version 2 or version 3 on your website, set up an account here, go through the steps to add a new site. You will then be supplied with your reCAPTCHA keys which you can add to your website using form plugins or theme settings. If you need help, you can contact Betta Webs or a developer to install it for you.


Make sure your domain is private

You can pay for the information associated with your domain name (that is, the name in your web address) to remain private. If your domain is public anyone can look up your domain information and access your email address this way. To make it private, contact your hosting company and they should be able to assist you. In most cases it would be an add on service they provide. 


Advanced options 

If you are comfortable with coded files for a website then here are some more ways you can prevent your email from receiving spam. However, if you are still having problems and would like help please contact Betta Webs.


Add a hidden field to your forms 

If you add a hidden field to your form that is intended to stay empty and a bot fills this out, you can use JavaScript to detect the change and stop the form submission. This is also known as a honeypot form. Below are some resources to help you get started.

WordPress: Include a honeypot plugin for contact form 7:

Custom: Find a detailed walk-through of code for forms here:


Add commands to your .htaccess file 

Warning: back up your .htaccess file basically the file that controls access and permissions on your website before you make any changes, as this can ‘break’ your website (in other words, show a 500 error). You should also be careful to not delete anything that is already there as your website may not function correctly without it. 

Here is a good example of what to add to your .htaccess file. By adding this list of commands you are blocking most spam bots from accessing your website.


Block unnecessary countries from accessing your website

If your company/product is only sold in the UK then you could block other countries based on their IP. You can use websites such as to get the IPs of up to 30 countries for free and then add the generated code to your .htaccess file. 


Summary: how to stop getting spam from your website

  1. Hide your email addresses behind link text such as “email us”.
  2. Install reCAPCHA version 2 or 3 on your website to verify form completions. 
  3. Make sure your website domain is private. 
  4. Add hidden fields to your forms like those offered by WordPress. 
  5. Add commands to your .htaccess file. 
  6. Block other countries from accessing your website. 

As always, we are here to help. Get in touch with Betta Webs today to find out how we could protect your website from spam bots.

Published by Rob Harris September 4, 2023
Rob Harris