WordPress Email Registration Blacklist (CMRB) - Use Case - How to Restrict Posting Comments for Non Registered Users Based on Email or Domain
Use Case - How to Restrict Posting Comments for Non Registered Users Based on Email or Domain
Note: This guide requires:
- WordPress Email Registration Blacklist - This document uses version 1.7.5.
Introduction
The WordPress Email Registration Blacklist plugin allows you to block users who try to register on your WordPress site using an email from a domain/email/IP defined in your blacklists/online lists. It also allows you to approve only users from a whitelist.
The plugin also allows to restrict posting comments by non registered users on your site.
Use Case Front-End

Use Case Assumptions
In this use case example we will consider how to restrict posting comments by non registered users on your site based on either the global white and blacklists of emails and domains, or based on the allowed list of domains.
It follows:
- Installing the plugin
- Quick recap
- Comments allowed domains settings
- Who is allowed to leave comments?
- End result
Installing the Plugin
The process is the same for all CM plugins and add-ons.

- Download the plugin from your customer dashboard.
- Log in to WordPress and navigate to the WordPress Admin → Plugins settings.
- Click on Add New.
- Activate it and add the license.
Learn more: Getting Started - Plugin Overview
Quick Recap
We recommend you first to get to know how white and blacklists work in the plugin. To do this, please, check the following use case guide:
Comments Allowed Domains Settings
To configure the feature for restricting comments, navigate to Admin Dashboard → CM E-Mail Registration Blacklist → Comments Allowed Domains tab.

There you will find the following settings:

Comments allowed domains control
- Use allowed domains for comments filtration - Enable this option to filter who is allowed to leave comments on your site.
- Use below whitelist domains for comments filtration - If enabled, only domains which are added in the Domains that are allowed to leave comments area will be allowed to leave comments.
- Domain is not allowed to left a comment - You can change the message that the guest will see, if he is not allowed to leave a comment.
Domains that are allowed to leave comments
- Add new domain or domain extension - Enter here domains that you want to be allowed to leave comments.
You can use full domain names (e.g. gmail.com) or wildcards (e.g. *mail.com). You can also use domain extension names with wildcards (e.g. *.com).
Who Is Allowed to Leave Comments?
First of all, this feature does not affect posting comments for registered users. If the user is registered on the site, it doesn't matter if he is logged-in or not. If he is logged-in, his comments will be published, and if he is not logged-in and tries to leave a comment using his email (that was used for registration on the site) - the comment will be published.
As for non registered users, there are two ways how you can filter who is allowed to leave comments.
Case #1 - Restriction Based On Global White and Blacklists
- The option Use allowed domains for comments filtration is enabled
The option Use below whitelist domains for comments filtration is disabled.
Filtering comments based on email/domain white and blacklists
In this case, filtering will work based on general settings of which lists are activate - domain and email white/black lists, DNSBL and Free Domain lists:

Let's check it all in action.
Here's an example of our Domain Blacklist:

Now let's try to leave a comment using one of the blacklisted domains - the user will just see a message that he's not allowed to leave comments.

And now let's try to leave a comment our blacklisted email:

The result will be the same - the user will see the same message as in the previous case with blacklisted domain:

Another case - in our domain blacklist we have a "gmail.com" domain, but one of the users that is registered on our site uses this domain - he was registered manually by the admin. The comment will be successfully published, because the user with this email is registered on the site.

The same will happen if the used email is either whitelisted or its domain belongs to one of the whitelisted domains - the comments will be published.
Case #2 - Restriction Based On the List of Allowed Domains
- The option Use allowed domains for comments filtration is enabled.
The option Use below whitelist domains for comments filtration is enabled.
Allowing leaving comments only to certain domains
In this case, only the users with email domains which are added to the Domains that are allowed to leave comments area will be allowed to leave comments. So let's add a few domains and one domain wildcard:

Before trying to use some domain from the list of allowed domains, let's first try to publish some comment using a whitelisted email, or using an email that belongs to the whitelisted domain.
Here's our whitelisted domain:

The comment will not be published in this case:

And here's our whitelisted email:

The comment will not be published in this case also:

And now let's try to leave a comment using any email with one of the domains that we've added to the list of allowed domains - the comment will be successfully published:

End Result
Following instructions found in the plugin and guides, you should be able to restrict posting comments by non registered users on your site.
Use Case Front-End

![]() |
More information about the WordPress Email Registration Blacklist plugin Other WordPress products can be found at CreativeMinds WordPress Store |
![]() |
Let us know how we can Improve this Product Documentation Page To open a Support Ticket visit our support center |