# How to Whitelist and Blacklist Domains in cPanel

https://www.hostcarts.qa/knowledgebase/article/how-to-whitelist-and-blacklist-domains-in-cpanel

You can blacklist (block) or whitelist (allow) domains in **cPanel** using two main areas:

- **Email Filters / Global Email Filters**
- **SpamAssassin (Apache SpamAssassin)**
- **Email Deliverability / DNS (for advanced allow‑listing)**

Below is the complete, practical guide you can apply immediately.

**How to Blacklist Domains in cPanel**

**Method 1: Using Global Email Filters (Recommended)**

Blocks emails from a specific domain for the entire cPanel account.

1. Log in to **cPanel**
2. Go to **Email → Global Email Filters**
3. Click **Create a New Filter**
4. Name the filter: Block Domain
5. Under **Rules**:
6. Under **Actions**: choose **Discard Message** or **Reject Message**
7. Save the filter

**Effect:** All emails from *@example.com* will be blocked.

**Method 2: Using SpamAssassin Blacklist**

1. Go to **Email → Spam Filters**
2. Enable **SpamAssassin** if not already enabled
3. Click **Show Additional Configurations**
4. Find **Blacklist (blacklist_from)**
5. Add entries like:
6. *@example.com
7. *@sub.example.net
8. Save

**Effect:** SpamAssassin marks these as spam or blocks them depending on your spam settings.

**How to Whitelist Domains in cPanel**

**Method 1: Using SpamAssassin Whitelist**

1. Go to **Email → Spam Filters**
2. Click **Show Additional Configurations**
3. Find **Whitelist (whitelist_from)**
4. Add entries like:
5. *@trusted.com
6. *@partner.org
7. Save
