Security Policy Errors

Block Messages from Specific Top-Level Domains in Exchange Online

Anum MushtaqAnum Mushtaq Nov 13, 2026 869 views

Question details

Microsoft 365 administrators need to block email from entire top-level domains without listing every individual sender domain.

Block Messages from Specific Top-Level Domains in Exchange Online
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.
Before you start

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.

Solution 1Recommended

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.

1
Open the rule editor

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.”

2
Set the sender-address condition

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.

3
Choose the blocking action

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.

4
Add trusted-domain exceptions

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.

5
Review sender matching and test

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.

Create a mail flow rule that matches the sender domain suffix
Sender-domain filtering has limits: This rule checks the selected sender-address location, not links in the message body or the sender's true identity. Header and envelope addresses can differ, and broad TLD blocking can affect legitimate organizations.
Free Microsoft Office alternative

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.

Use WPS Writer to document blocked suffixes and trusted-domain exceptions.Track mail flow rule tests and rollout results in WPS Spreadsheet.Work with Microsoft Word .docx, Excel .xlsx, and PowerPoint .pptx files.Use familiar editing tools in a lightweight office suite.
microsoft office alternative - wps office

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.