If someone keeps sending you unwanted email, you can block the sender from your Instant Access Internet Services cPanel with an email filter. This guide shows you how to block an email address or a whole domain, either for a single mailbox or for every mailbox on your domain.
Choose where to block the sender
- One mailbox only -- use Email Filters. Only that account is affected.
- Every mailbox on your domain -- use Global Email Filters. Good for a spammer or a pushy salesperson who writes to everyone at your company.
The steps are almost the same for both.
How to block an email address
- In cPanel, go to Email > Email Filters and click Manage Filters next to the mailbox. (For all mailboxes, go to Email > Global Email Filters instead.)
- Click Create a New Filter.
- In Filter Name, type something you'll recognize later, for example
Block spammer@example.net. - Under Rules, set the first drop-down to From, the second to contains, and type the sender's address in the box, for example
spammer@example.net. - Under Actions, choose what should happen (see the next section). For most people, Deliver to Folder and the Junk folder is the safest choice. To delete the messages instead, choose Discard Message.
- Click Create.
The filter works on new messages from that moment on. Messages already in your inbox aren't touched.
How to block a whole domain
Follow the same steps, but in the rule box type just the domain with the @ sign in front, for example @example.net. With contains, this matches every address at that domain.
To block several senders in one filter, click the + button next to the rule to add another line, and set the joining drop-down to or. If you leave it on and, a message would have to match every line at once, so the filter would never trigger. Keeping one simple filter per sender is also fine and easier to manage.
Which action should you pick?
| Action | What happens | When to use it |
|---|---|---|
| Deliver to Folder | The message is quietly moved to a folder you choose (click Browse to pick one, such as Junk). | Best choice for most people. Nothing is lost if you blocked the wrong sender by mistake. |
| Discard Message | The message is deleted before it reaches the mailbox. The sender isn't told. | When you are sure you never want to see these messages. They can't be recovered. |
| Fail with Message | The message is rejected and a bounce with your text is sent back. | Rarely. Spammers usually fake the sender address, so the bounce goes to an innocent person. Avoid this for spam. |
Test the filter
For a per-mailbox filter, go back to the Manage Filters page and use the Filter Test box. Paste a sample header such as:
From: spammer@example.net To: you@example.com Subject: Test
Click Test Filter. The results show whether your filter matched and which action it would take. Global Email Filters have the same test box.
How to unblock a sender
Go back to Email Filters (or Global Email Filters), find the filter and click Delete, then confirm with Delete Filter. To change the address instead, click Edit, make your change and save.
Common questions
The spam comes from a different address every time
Blocking by address won't help if the sender keeps changing. Block by a word that is always in the subject instead (Subject + contains), or see Why Your Emails Go to Spam (and How to Fix It) for broader spam advice.
Can I block by IP address?
Not from cPanel on standard plans -- and most senders change IP addresses often anyway. Use a filter as shown above. If you're under a flood of junk mail, open a ticket and we'll take a look.
Is there a block option in webmail?
Marking a message as junk in Roundcube or your mail app helps that app learn, but it doesn't stop the message reaching the server. A cPanel filter stops it for every device at once.
Related guides
- How to Create Email Filters for One Account in cPanel
- How to Create Global Email Filters in cPanel
- Why Your Emails Go to Spam (and How to Fix It)
- How to Log In to Webmail (Roundcube)
Still stuck? Open a support ticket and the Instant Access Internet Services team will help.
