# How to blacklist and whitelist domains in Microsoft 365 (Exchange Online).

https://www.hostcarts.in/knowledgebase/article/how-to-blacklist-and-whitelist-domains-in-microsoft-365-exchange-online

### **Anti-Spam Policy **

Use this if you want to block but still allow spam filtering to process messages.

### Steps

1. Go to **Microsoft 365 Defender**
2. Email & collaboration → **Policies & rules**
3. **Threat policies** → **Anti-spam policies**
4. Edit the **Default Anti-Spam Policy** or create a new one
5. Under **Blocked Senders and Domains**, add: `example.com`
6. Save
