Gmail Filter Manager logoGmail Filter Manager
Back to blog
6 min read

Gmail Wildcard Filters: How to Filter Emails by Domain

When you want to filter emails from a specific company, blocking individual email addresses is a losing game. Companies send from dozens of addresses — marketing@, noreply@, support@, alerts@, billing@, and more. The solution is a domain-level wildcard filter that catches every address at that domain in one rule.

Basic Wildcard Syntax

Gmail supports the * wildcard character in filter criteria. To filter all emails from a domain:

from:*@example.com

This matches any sender address that ends with @example.com: [email protected], [email protected], [email protected], and so on.

You can use this in any filter creation method:

  • In the Gmail search bar, then clicking "Create filter."
  • In Settings → Filters → Create a new filter, in the From field.
  • Through tools like Gmail Filter Manager, which auto-detects the sender domain.

Subdomain Handling

One of the most common mistakes with domain filters: *@example.com does not match subdomains like [email protected] or [email protected].

If a company sends from subdomains, you have a few options:

Option 1: Filter multiple patterns

Create a single filter with multiple domain patterns in the From field:

*@example.com OR *@mail.example.com OR *@news.example.com

This catches all three domains but requires you to know which subdomains the company uses.

Option 2: Use the "Has the words" field

Instead of the From field, use the "Has the words" (or "Includes the words") field with this search operator:

from:example.com

Without the *@ prefix, Gmail performs a broader match that often catches subdomains. However, this is less precise — it could also match an address like [email protected] if the domain name appears elsewhere in the message headers. In practice, false positives are rare, but it is worth knowing the trade-off.

Option 3: Use the list: operator for mailing lists

If the emails come from a mailing list, you can filter using:

list:example.com

This matches the List-ID header, which is more reliable than the From address for mailing lists and often covers subdomains.

Common Provider Gotchas

Some email senders use third-party services to send their messages, which means the "From" domain may not match what you expect.

Marketing platforms

Companies using services like Mailchimp, SendGrid, or Constant Contact often send from addresses like [email protected] or even from a completely different domain owned by the email service provider. The "From" address you see might be [email protected], but the envelope sender (used for bounces) is different.

Gmail filters match on the visible "From" address, so *@company.com usually works. But if it doesn't catch everything, check the full email headers (open an email → three-dot menu → "Show original") to find the actual sending domain.

Google Workspace domains

If you are filtering emails from another Google Workspace (formerly G Suite) organization, *@theirdomain.com works reliably because they control their own sending domain.

Shared hosting domains

Be careful with domain filters for large shared platforms. For example, filtering *@gmail.com would catch every Gmail user, which is almost certainly not what you want. Domain filters are best suited for company-owned domains where you want to block or sort all mail from that organization.

Advanced Wildcard Patterns

Beyond basic domain filtering, Gmail supports some useful patterns:

Multiple domains in one filter

Use the OR operator (must be uppercase) to match multiple domains in a single filter:

from:*@company-a.com OR from:*@company-b.com OR from:*@company-c.com

This is useful when a parent company sends from multiple brand domains.

Combining domain filter with keyword exclusion

What if you want to filter most emails from a domain but keep certain important ones? Combine the domain filter with a negative keyword:

From: *@company.com

Doesn't have: invoice OR payment OR receipt

This filter catches all emails from company.com except those containing "invoice," "payment," or "receipt" in the body or subject.

Plus addressing with wildcards

If you use Gmail's plus addressing (e.g., [email protected]), you can filter based on the "To" address:

To: [email protected]

This catches everything sent to that plus address, regardless of who sent it. Combine it with a domain filter for even more precision.

Practical Use Cases

Block all email from a company

Create a filter with *@company.com and set the action to "Delete it." Apply to existing conversations to clean up retroactively.

Auto-label emails from a client

Filter *@client.com and apply a label like "Clients/ClientName." Optionally star them so they stand out in your inbox.

Sort all social media notifications

Create one filter for multiple social platforms:

from:*@facebookmail.com OR from:*@twitter.com OR from:*@linkedin.com OR from:*@instagram.com

Skip the inbox and apply a "Social" label. Check it when you have downtime.

Archive all internal automated reports

If your company's automated systems send from a specific subdomain:

from:*@reports.yourcompany.com

Skip inbox, apply "Reports" label, mark as read.

Setting Up Domain Filters Quickly

When you are cleaning up your inbox, you often discover multiple domains you want to filter in a single session. Going through Gmail Settings for each one takes time. Gmail Filter Manager speeds up the process — select emails from a sender, and it automatically identifies the domain and lets you create a filter with your chosen action in a couple of clicks.

Testing Your Filters

After creating a wildcard filter, verify it works:

  1. Go to Gmail Settings → Filters and Blocked Addresses.
  2. Find your new filter and confirm the criteria are correct.
  3. Search for from:*@domain.com in Gmail to see which existing emails match.
  4. If you chose "Also apply to existing conversations," verify those messages were moved/labeled/deleted as expected.

Domain-level wildcard filters are one of the most useful tools in Gmail's arsenal. One well-crafted filter can eliminate dozens or hundreds of emails per month from your inbox, and once set up, it requires zero ongoing effort. If you are only filtering individual email addresses today, switching to domain-level filters is one of the highest-impact changes you can make to your email workflow.

Tired of creating Gmail filters the hard way?

Gmail Filter Manager lets you select emails right in your inbox and create permanent filters in one click. Free, open-source, and completely private.

Learn more