Technology in terms you understand. Sign up for the Confident Computing newsletter for weekly solutions to make your life easier. Click here and get The Ask Leo! Guide to Staying Safe on the Internet — FREE Edition as my thank you for subscribing!

How Do I Block All Email From a Specific Domain in Gmail?

Filter trickery.

It's not obvious, but there's an easy way to block all email sent to you from a single domain. Just make sure it's really what you want.
Spam Bin
(Image: canva.com)

Unlike other email services, Gmail doesn’t make it easy to block all email from a specific domain. You can easily block individual email addresses, but blocking an entire domain is not obvious.

That doesn’t mean you can’t do it. I’ll show you how.

Become a Patron of Ask Leo! and go ad-free!

TL;DR:

Blocking email from a specific domain

To block an entire domain in Gmail, you can use a filter trick: search for “from:(@domain)”, open the advanced search, and create a filter to delete emails from that domain. If needed, you can edit or delete the filter in settings later.

All email from a domain

Let’s define what we mean first. The “domain” is that part of an email address after the “@”. So in “leo@askleo.com”, the domain is askleo.com. For “example@gmail.com” it’s gmail.com.

Blocking all email from a domain means that no email from any email address on that domain will get to you. Blocking all email from gmail.com, for example, will prevent anyone with a Gmail address from reaching you.

While that’s likely not what you want, there are scenarios — typically spam-related — where blocking an entire domain makes sense. If you’re being flooded with email from some obscure email domain, particularly from another country, there may be no downside to blocking them all. The upside, of course, would be a tamer inbox.

A Gmail filter trick

It’s not really a trick; it’s just not obvious.

With email from the domain you’re considering blocking in your inbox, search for “from:(@domain)”. So if you’re getting a flood of email from “someone@randomisp.com”, search for “from:(@randomisp.com)” as shown below.

Searching for all email from a specific domain.
Searching for all email from a specific domain. Click for larger image. (Screenshot: askleo.com)

Double-check the results. Make sure you’re:

  • Seeing the email you want to block and
  • Not seeing any email you want to keep.

Once you’re satisfied, click on the sliders icon at the end of the search field.

Sliders icon.
Sliders icon. Click for larger image. (Screenshot: askleo.com)

This will open up the advanced search dialog.

Gmail advanced search.
Gmail advanced search. Click for larger image. (Screenshot: askleo.com)

While you can make adjustments here, you don’t need to. It’s pre-filled with the search we just performed.

Click on Create filter at the bottom.

Gmail filter settings.
Gmail filter settings. Click for larger image. (Screenshot: askleo.com)

This lists actions to be taken when incoming mail matches your search criteria. I’ve selected “Delete it” as there’s no “Mark as spam” option.

Click on Create filter and your filter will take effect on any subsequently received email.

Removing or editing a filter

Click on the gear icon at the upper right of the Gmail screen and then on See all settings. Click on the Filters and Blocked Addresses tab.

Gmail list of filters.
Gmail list of filters. Click for larger image. (Screenshot: askleo.com)

To the far right (not shown) are edit and delete buttons. Click edit to make changes or delete to remove the filter completely.

Do this

While “Mark as spam” is probably the most-used approach to dealing with spam, if you’re getting too much email from different addresses on the same domain, you can now block (automatically delete) all email from that domain.

Don’t block me!  Subscribe to Confident Computing! Less frustration and more confidence, solutions, answers, and tips in your inbox every week.

Podcast audio

Play

1 thought on “How Do I Block All Email From a Specific Domain in Gmail?”

Leave a reply:

Before commenting please:

  • Read the article.
  • Comment on the article.
  • No personal information.
  • No spam.

Comments violating those rules will be removed. Comments that don't add value will be removed, including off-topic or content-free comments, or comments that look even a little bit like spam. All comments containing links and certain keywords will be moderated before publication.

I want comments to be valuable for everyone, including those who come later and take the time to read.