Skip to main content

Having a website with the membership, registration, or account creation process? You may need to confirm the account by sending a verification email. But many exploit this process by using some temporary or spam email service like,, etc. to complete the process. This adds lots of spam emails to your database and it is important to block those spam users on your website while they are signing up. This is possible using some of the WordPress plugins. So let’s see how to block disposable Email address signed up on your WordPress website.

Also read 10 Best Autoresponder Plugins for WordPress 2021 [Free & Paid]

Steps to Block Disposable Email Addresses in WordPress

Using plugins is the easy and simple way on WordPress to block disposable or temporary Emails on your WordPress website. Here is how you can complete the process in WordPress.

[1] From your WordPress dashboard, click on Plugin.

Plugin >> Add New
[2] Choose Add New and search for the Ban Hammer plugin.

Ban Hammer - How to Block Disposable Email Address in WordPress
[3] Click on Install Now to install the plugin.

Install Now - How to Block Disposable Email Address in WordPress
[4] Once installed, click on Activate to activate the plugin on your WordPress website.

[5] Once activated, click on Tools on your WordPress dashboard.

[6] Choose Ban Hammer from the expanded menu.

[7] First, enter the Error or Not Allowed message in the Personalize the Message text area.

For Example: <strong>Error: <strong> Your Email Address is invalid.

[8] Followed by that, add the Email address or the domains that are needed to be blacklisted.

Ban Hammer Tool

Note: Here are some of the list of domains that you can add to your Blacklisted Emails list. You can just copy and paste all the domains available in the list to your blacklisted emails box.

[9] Once done, click on Update Options to save all the changes done.

[10] Now you have successfully protected your WordPress website registration from Disposable and temporary email addresses.

WordPress login - How to Block Disposable Email Address in WordPress

After setting up the plugin, if any user tries to register on your WordPress site with a disposable email address, they will be restricted instantly from the registration process with the Error message. Also, with this method, you can even restrict users with a particular email ID or domain by adding it to the blacklist. Also, check out our article on How to Build Email List in WordPress which might be useful to you.

Apart from Ban Hammer, there are various other WordPress plugins which you should checkout namely

Alternate Way

Without plugins, you can also block those disposable emails using PHP code. This requires good PHP coding knowledge. If you are expertized in PHP, then go to your login page code from the theme customization page, and change the code under the Email address by adding an exception for the Blacklisted emails using the if-else statement.

For example

$blacklist_email = Array (); 
//Enter all the blacklisted Email ID inside the array here using commas (,)
if (Email_id = $blacklist_email)
//replace Email_id with the name you have provided for your Email ID text box.
//use strpos after @ if you are validating only domains
echo "Your Email Address is Invalid";
//Proceed with the signup process


Hope this guide helps your keep your website away or block your WordPress website from disposable Email address spammers. This will actually help you have more real-time subscribers than temporary users. Also, Email marketing is the best way to contact your website user and inform any news about the site to the user. So it is important to have a valid email ID. Thank you for reading the article. If you have any queries let us know in the comments section below.

Leave a Reply