Block Messages from Specific Top-Level Domains in Exchange Online
Question details
Microsoft 365 administrators need to block email from entire top-level domains without listing every individual sender domain.

- Product
- Microsoft 365 Exchange Online
- Device & OS
- not provided
- Scenario
- Filter incoming email from sender domains ending in suffixes such as .org, .cn, and .site using a mail flow rule.
- Observed behavior
- The desired result is to reject or quarantine messages from the selected top-level domains while allowing legitimate email through appropriate exceptions.
Sign in to the Exchange admin center with an account authorized to manage mail flow rules. Identify the suffixes to block and any trusted sender domains that need exceptions, especially before blocking a widely used suffix such as .org.
Create a mail flow rule that matches the sender domain suffix
Use a sender-address pattern to block entire top-level domains without maintaining a list of individual domains.
A simple “address includes” condition can match unintended text elsewhere in an email address. A pattern anchored to the end of the sender address targets the domain suffix more precisely.
In the Exchange admin center, go to Mail flow > Rules. Select Add a rule > Create a new rule, and give it a descriptive name such as “Block selected sender TLDs.”
Under Apply this rule if, select The sender > address matches any of these text patterns. Enter @[^@]+\.(org|cn|site)$ to match addresses whose domains end in .org, .cn, or .site. The escaped period matches a literal dot, and the final $ anchors the match to the end of the address.
Under Do the following, select Block the message and choose either rejection with an explanation or delivery to hosted quarantine, depending on the options available in your tenant. If rejecting messages, enter an explanation consistent with your organization's email policy.
Under Except if, add an exception for approved sender domains or addresses that would otherwise match. For example, use The sender > domain is to exempt a trusted .org domain.
Continue to the rule settings and review Match sender address in message, choosing Header, Envelope, or Header or envelope according to your policy. Use a test mode first, send controlled messages from matching and nonmatching domains, and review rule reports before switching the rule to Enforce.

Use separate mail flow rules for different domain suffixes
Create individual rules when each top-level domain needs a different action, exception list, or rollout schedule.
Document Your Email Filtering Policy with WPS Office
WPS Office does not manage Exchange Online or block email. It offers a free, lightweight alternative for everyday document work, with a familiar interface and Microsoft Office format compatibility for an easy transition when maintaining filtering policies and test logs.

Frequently Asked Questions
Can I block .org, .cn, and .site in one Exchange Online rule?
Yes. In Exchange admin center > Mail flow > Rules, create a rule using The sender > address matches any of these text patterns. Enter @[^@]+\.(org|cn|site)$ and select the rejection or quarantine action.
Why use a pattern instead of checking whether the address contains .org?
An “includes” condition can match .org anywhere in the address, including a domain such as example.org.com. The pattern @[^@]+\.org$ requires the sender domain to end in .org.
Will the pattern also match subdomains?
Yes. The pattern @[^@]+\.org$ matches both user@example.org and user@mail.example.org because both sender domains end in .org.
How do I allow a trusted organization through a blocked top-level domain?
Edit the rule in Mail flow > Rules and add an Except if condition for the trusted sender domain or address. Test both the exempt sender and a nonexempt sender from the same top-level domain before enforcing the rule.
Does blocking a sender's top-level domain also block links with that suffix?
No. A sender-address condition checks the sender address selected by the rule's matching settings. It does not inspect website links in the message body; link protection requires separate security controls.




