How To: Use Custom Rules to Block Specific TLDs

Why would I want to block a top-level domain (TLD)?

You may wish to block an entire top-level domain (TLD) if you find yourself receiving a large amount of spam or other unwanted mail from a specific top-level domain. For instance, the TLD for Belgium is .be.

If you find yourself receiving a lot of unwanted mail from a .be address, you do not otherwise need to do business with anyone using a .be address, and all other email blocking options have been exhausted, you may wish to block any and all mail from .be addresses.

Creating a Custom Rule to Block TLDs

By creating a Message Rule, you can dictate how mail is handled based on various conditions. In this article, we will be creating a rule to quarantine any mail from a specific top-level domain.

To create a Message Rule to block TLDs:

  1. Navigate to the Mailprotector Console at
  2. Navigate to the Reseller, Customer, Domain, Group, or User that you'd like to create the rule for
  3. Select the "Filtering" tab
  4. Go to the "Message Rules" section
  5. Input a descriptive rule name, select the "Incoming" rule with an "Empty" template, and click the Create button
  6. Under the "Criteria" section input the TLD domain you'd like to block in the "Sender" field.

    NOTE: You will need to use the Regex code shown below to properly block a TLD. The format for this example is: /\.be$/

  7. Navigate to the "Actions" tab
  8. Toggle on the option "Hold For Review." This will cause the emails caught by the Message Rule to be quarantined.
  9. Select the back arrow in the top left-hand corner
  10. Toggle the rule on if it is showing disabled

NOTE: To match the criteria for all TLD's that aren't related to business within the United States, you can input the Regex below into the Sender criteria. This will result in all emails containing a TLD outside of the United States to be a match on this rule.


For Further Assistance

For further assistance, please contact Mailprotector support via the "Submit a Request" link or by calling 1-800-393-4840 X2.

Have more questions? Submit a request