How to Set WordPress to Block a Disposable Email Address

Nearly every website on the Internet is subject to spam. And although you might put certain addresses in a blacklist, sometimes the spam just keeps coming. In many cases, this is due to disposable email addresses.

It can be quite bothersome to constantly add one address after another while trying to combat spam.

Luckily, it’s easy to set WordPress to block a disposable email address. With the right blacklist plugin, you can spend less time moderating for spam and more creating content visitors love.

In this tutorial, I’ll show you a quick and easy way to block disposable email domains.

What are Disposable Email Addresses?

A disposable email address is one created that is temporary in nature. Usually, these addresses last for a very short amount of time and then automatically delete themselves.

This lets people create a quick address for a variety of purposes, such as registering accounts or creating logins on sites.

It’s quite a common practice among scammers and spammers to generate these disposable accounts as it eliminates a digital trail of who is sending the messages.

Using Ban Hammer

Today, I’ll show a bit of what the “Ban Hammer” plugin can do for you. It will detect a disposable email address and deny the user from using it on your WordPress website.

Instead of an IP blacklist, which isn’t always the best way to block someone, it operates by analyzing disposable email domains.

NOTE: Ban Hammer and plugins like it require that user registration is active on your website.

Install and activate the “Ban Hammer” plugin.

Ban Hammer

Go to Tools and click, “Ban Hammer.”

Tools Ban Hammer

In Ban Hammer, you have a few options:

  • Blocked Message
    You can customize the error message which shows when users try to use a blocked domain when registering.
  • Redirect Blocked Users
    This lets you redirect blocked users to a custom URL. For example, you can redirect banned users to a Terms of Service page. However, you need to check the box and “Save Changes” before you can add a specific URL.
  • The Blacklist
    In the Blacklist field, you can add as many addresses, domains and keywords you want to ban. This lets you blacklist specific email addresses as well as entire domains. And if you want to keep your registration clean, you can ban certain words from being used in the address as well.

Once you’re done editing, click the “Save Changes” button on the bottom.

Save Ban Settings

For instance, you could block every registration from using Yahoo addresses by adding: I’m not sure why you would want to block a valid online email host, but it’s possible.

Do not use wildcards. This plugin does not support the feature. So you wouldn’t want to use the asterisk at all when adding terms. For instance, * will not work.

Adding Addresses to Block Spam in WordPress

To get you started, you can open a list of disposable domains from GitHub. This list has more than 4,000 addresses to use in any WordPress blacklist plugin including this one.

To start, go to the GitHub page for the emails.txt file.

Copy all of the addresses from this list.

Copy Domains

Paste the domains into the Ban Hammer plugin.

Paste Domains

Once you click Save Changes, all of the domains in the blacklist are blocked from registration in WordPress.

Other WordPress Blacklist Plugins

While Ban Hammer is functional and easy to use, it might not serve your purposes precisely. For one thing, Ban Hammer doesn’t stop spam comments, subscriptions or spam in surveys and polls.

Here are a few other plugins for you to consider depending on your needs.



CleanTalk makes a great tool to reduce spam in the form of its Spam protect, AntiSpam, FireWall plugin. It supports a wide range of registration forms such as Contact Form 7 and BuddyPress.

It’s a feature-rich all-in-one system that has almost anything you could need to prevent spam from saturating the website.

All In One WP Security & Firewall

All In One WP Security

The All In One WP Security & Firewall plugin is another tool that comes complete with a vast array of protection features. This is one of those plugins which center mostly around the use of IP addresses.

It does well enough to block spammers from a specific location. However, the growing use of Virtual Private Networks makes this somewhat less efficient as opposed to domain blacklisting.

Loginizer Security

Loginizer Security

Loginizer Security uses both IP and domains in its WordPress blacklist plugin. You can use it to automatically block IP addresses that are detected as spam, bots or hackers or ban domains directly from registrations.

It’s probably a more efficient method than Ban Hammer if you’re also worried about brute force hacking attempts.

Keep Registrations Clean

Using WordPress to block disposable email addresses is just one of many methods you’ll need to keep the database clean. From spam comments to fake email subscriptions, it can be a daunting task at times.

Find tools that work perfect for you. With the sheer number of plugins available, you’re sure to find something that fits your site design.

How often do you find spam accounts in your registration or comment section? Would you prefer to block IP addresses or domains?

1 thought on “How to Set WordPress to Block a Disposable Email Address”

  1. This is a nice list and I can see a good amount of effort that has gone into the blog. I would appreciate if you can add to the list as well. Antideo is an API service that helps user to do a live detection of disposable email addresses and the list is auto-updated so that you always stay ahead of the curve. And the icing on the cake is that a user can make upto 5000 API/month for free

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.