Block Unwanted Top-Level Domains in Exchange Online
Question details
Block or reduce incoming spam from unwanted top-level domains in Office 365.

- Product
- Microsoft Exchange Online
- Device & OS
- not provided
- Scenario
- An administrator wants to restrict email from top-level domains such as .top, .faith, .science, .ru, and .cn.
- Observed behavior
- Users receive large volumes of spam from these domains, and an allow-only TLD rule is not a practical fit for the requirement.
Sign in with an account that can manage Exchange mail flow rules or anti-spam policies. Identify the TLDs or specific sender domains you want to block, and check whether legitimate correspondents use them.
Block selected TLDs with an Exchange Online mail flow rule
Use a sender-address pattern to target a defined list of unwanted TLDs without listing every domain individually.
This approach targets selected TLDs rather than creating an exhaustive allow-only list. Blocking an entire TLD can also affect legitimate messages.
Open the Exchange admin center at https://admin.exchange.microsoft.com, go to Mail flow > Rules, and select Add a rule > Create a new rule.
Under Apply this rule if, select The sender > address matches any of these text patterns. Add the pattern @[^@]+\.(top|faith|science|ru|cn)$, adjusting the TLDs to match your requirements.
Under Do the following, select Block the message and choose whether to reject it with an explanation or delete it without notifying anyone.
Choose a test mode in the rule settings and save the rule. Review the results for affected senders, then edit the rule and enable enforcement when you are satisfied.

Block specific sender domains in an anti-spam policy
Use the blocked domains list when you know the individual domains sending unwanted mail.
Work with Office files using WPS Office
WPS Office is a free, lightweight Office alternative with a familiar interface and support for common Microsoft Office formats, making it easy to move existing documents. It does not manage Exchange Online mail flow or spam policies.

Frequently Asked Questions
Can I block every domain under a TLD using the blocked domains list?
The blocked domains list is intended for specific domains. To target a defined set of TLDs, create a sender-address pattern under Exchange admin center > Mail flow > Rules.
Will blocking a TLD affect legitimate email?
Yes. A rule targeting a TLD can match legitimate senders as well as spammers. Use a test mode first and review the results before enabling enforcement.
Where can I block a specific spam domain?
In the Microsoft Defender portal, go to Email & collaboration > Policies & rules > Threat policies > Anti-spam. Edit the applicable inbound policy and add the domain to its blocked domains list.
Can WPS Office configure Exchange Online spam filtering?
No. Configure mail flow rules in the Exchange admin center and anti-spam policies in the Microsoft Defender portal. WPS Office is an alternative for working with Office files.




