• Outlook User
  • New Outlook app
  • Outlook.com
  • Outlook Mac
  • Outlook & iCloud
  • Developer
  • Microsoft 365 Admin
    • Common Problems
    • Microsoft 365
    • Outlook BCM
    • Utilities & Addins

Create rules that apply to an entire domain

Slipstick Systems

› Outlook › Rules, Filters & Views › Create rules that apply to an entire domain

Last reviewed on March 16, 2017     44 Comments

Applies to: Outlook (classic), Outlook 2010

Is there a way to set up a rule so that all emails from a specific server (example microsoft.com) go into a specific folder? I can do it individually each time someone from work emails me but want to set it up so that people from microsoft.com who have never emailed me would automatically go into my MS folder?

The finished ruleYes. You need to enter just the email domain and cancel the Check Names dialog when it appears. The finished rule will look like the image on the right in Rules Wizard.

While this rule trick works in Microsoft Outlook 2010 and up, it's not necessary as Outlook 2010 includes a rule for "specific words in the senders address" which you can use instead. A similar rule exists for 'words in the recipients address'.

To apply a rule only to internal Exchange email, create a rule that applies to all mail and add an exception for messages with @ in the sender's address. Internal Exchange email does not use a SMTP address and therefore, does not contain an @ sign. If you don't want to use Exceptions, you can look for /ou in the address instead.
Rules for mail from Exchange server

Outlook 2010 and up "words in the address" method

If you are using Outlook 2010 and up, you can create a rule "with specific words in the sender's address", highlighted in the red box in the screenshot.
Create a rule with specific words in the sender's address

Select the condition, click on the underlined words in the lower part of the dialog box then type the domain name you want the rule to apply to.

Note: The two items marked with arrows provide alternate ways to do this and are also available in older versions of Outlook.

If you want to apply a rule to all mail originating outside of Exchange Server (including Office 365 Exchange Online), use @ in place of the domain name in this rule.

Outlook 2003 and up "from people or group" method

Step 1: Begin creating the rule, using the condition "from people or public group".
Select address in Outlook's Rules Wizard dialog

Click in the underlined people or public group at the bottom of the dialog box to open the Rule Address dialog.

Type the domain portion of the address in the Address field at the bottom of the dialog.

To apply this rule to all email from Internet addresses, enter just an @ sign in the From field. Mail originating on your Exchange server will be skipped.

Step 2: Click Ok after entering the domain in the address field, then Cancel the Check Names dialog when it appears.
Cancel the choose address dialog

Create rules that apply to an entire domain was last modified: March 16th, 2017 by Diane Poremsky
Post Views: 283

Related Posts:

  • Apply Conditional Formatting to Internal Email
  • To create a rule with wildcards
  • Microsoft Outlook contains a rule condition you can use to sort mail r
    Create rules to sort messages by email account
  • Filter Internal Mail from External Mail

About Diane Poremsky

A Microsoft Outlook Most Valuable Professional (MVP) since 1999, Diane is the author of several books, including Outlook 2013 Absolute Beginners Book. She also created video training CDs and online training classes for Microsoft Outlook. You can find her helping people online in Outlook Forums as well as in the Microsoft Answers and TechNet forums.

Comments

  1. Stef Joosten says

    August 14, 2023 at 1:08 am

    I have the same problem on Outlook for Mac, vs. 16.75.1. I can find no way to do this. Can anybody help?

    Reply
    • Diane Poremsky says

      August 15, 2023 at 7:49 am

      Are you using New Outlook or Legacy Outlook?

      What is not working?

      Reply
    • Camille says

      September 15, 2023 at 7:27 am

      @stef, check in the Keywords section of the dropdown, and select 'Sender address includes' - Worked for me!

      Reply
  2. Kevin says

    January 8, 2023 at 9:08 pm

    Thank you!

    Reply
  3. Chris Notley says

    December 17, 2020 at 2:58 am

    Fantastic, just what I needed Diane!

    Reply
  4. Maggie Hedrick says

    September 25, 2020 at 9:30 am

    I created a rule for student emails (specific domain) and it is an auto-reply but it is only sending the first time a student emails, rather than each time if they email more than once. Why is the rule not applying each time if the address should still be included in the rule?

    Reply
    • Diane Poremsky says

      December 17, 2020 at 8:46 am

      That is how autoreplies work in outlook. You will need to use a 'run a script' rule to replay to every message. https://www.slipstick.com/developer/run-a-script-rule-autoreply-using-a-template/

      Reply
  5. Jerry Peres says

    June 2, 2020 at 1:59 am

    Thank you for sharing good knowledge and information. It's very helpful and understanding as we are looking for this information for a long time.

    Reply
  6. SAL says

    September 26, 2019 at 4:54 pm

    Please add instructions for OWA too.

    Reply
  7. Nate Olsen says

    January 24, 2018 at 6:49 pm

    NOTE: the "words in address" rule block seems to create a client-only rule.

    If *@domain.com or @domain.com work perfectly fine in the "from sender" rule block, I'd say that's a preferred method since it's a server-side rule.

    Reply
    • JASIM PERINGATTUTHODI says

      June 16, 2019 at 1:11 am

      *@domain.com or @domain.com rules not working

      Reply
      • Diane Poremsky says

        June 16, 2019 at 1:17 am

        Are you using words in the header or words in the message header rules? Are the message being picked up by the junk mail filter first?

  8. Richard says

    October 15, 2017 at 7:13 pm

    Thanks for pointing out the usefulness of the "with specific words in the sender's address" or "recipient's address". Voila! Problem solved.

    Reply
  9. Vasco says

    March 15, 2017 at 7:50 am

    Just wondering if you know of a way to create a rule to move/copy email which are NOT from a specific domain?
    e.g. I work at New Co. which domain is newco.com. I would like a rule to copy/move all emails which are not internal (i.e. from @newco.com) in order to identify all external emails, which could be direct engagements from clients.

    Thank you in advance.

    Reply
    • Diane Poremsky says

      March 16, 2017 at 12:24 am

      If using exchange, move all mail with @ in the address - only mail from internet addresses will have @ in the address.

      If you want to apply a rule to all mail originating outside of Exchange, use @ in place of the domain name.
      To apply a rule only to internal email, create a rule that applies to all mail and add an exception for messages with @ in the sender's address. Internal Exchange email does not use a SMTP address and therefore, does not contain an @ sign. For internal Exchange server mail, you can use /ou.

      Reply
  10. MPJ says

    December 19, 2016 at 5:59 pm

    Thanks for the tip! I've been getting a bunch of spam from a certain domain and this helped me safely get it out of my Inbox.

    Reply
  11. Ramon Henry says

    November 7, 2016 at 4:21 pm

    When I ad an email for a rule it same the email as =SMTP:you@yourdomain.com and then the rule never runs

    Reply
  12. DOSMASTR says

    October 8, 2016 at 10:10 pm

    THANK YOU FOR THIS, I JUST MADE BETTER SPAM RULES THAN JUNO.COM HAS!!

    Reply
  13. Pharme51 says

    August 19, 2016 at 9:05 am

    Very nice site!

    Reply
  14. edithtots says

    June 28, 2016 at 10:11 am

    Thank you, it worked

    Reply
  15. The Tim says

    June 16, 2016 at 3:04 pm

    I spent an hour getting no where with a search for these directions. Thank you so much. Now all of my customer's emails stand out against the hundreds of unimportant internal messages

    Reply
  16. Smith says

    January 7, 2016 at 10:41 am

    I really appreciate this post. I have been looking everywhere for this! Thank goodness I found it on Bing. You have made my day! Thx again!

    Reply
  17. Arthur says

    October 28, 2015 at 7:19 pm

    Hi. The top section on this page, where you mention using just the domain name in the 'from people or public group' component and cancel the Check Names window is a great trick.
    However, I think I just verified that it doesn't work in Outlook 2016, by trying with both with and without the @ sign (this is Exchange Activesync, so there's no in/outside the Exchange Server). If you think that it really should work (e.g. maybe it is caused by the EA type of connection etc.), you might be able to try it out yourself too.
    It does support the 'with specific words in the sender's address' as you indicate, but it won't be as specific (e.g. if microsoft.com in the example ever starts sending from microsoft.commie.com, I wouldn't want to miss any of those emails :-), but the pattern would match it as well).
    In an ideal world I would explicitly want to use something like '\bmicrosoft.com$', but as you indicate on another page that is also extremely useful, not even wildcards are allowed in these values, so there's probably no chance for regular expressions.
    Thanks.

    Reply
    • Diane Poremsky says

      October 28, 2015 at 11:33 pm

      i don't think it worked right in 2013 either but will double check both (if i recall correctly, it works on display named, not addresses now) - the 'new' way is to use words in the address.

      Reply
      • Arthur says

        October 29, 2015 at 12:45 pm

        Oh, okay, that would make sense – they have the 'with "specific words" in the sender's address' for the email address part, and might have switched 'from "people or public group"' to operate on the display name.
        Thank you for the response and the informative article.

  18. Chip Jones says

    October 14, 2015 at 11:06 am

    Is it possible to block certain TLDS by using a dot before the TLD. For example, I get a lot of junk mail from the TLD ".eu". How does Rules Manager handle the "." Is the period treated like a escape character (like in a regular expression) or is it used as a string character?

    Reply
    • Diane Poremsky says

      October 14, 2015 at 11:46 am

      its treated as a string character. also se https://www.slipstick.com/outlook/email/add-eu-international-tld-blocked-list/ - note that eu is available in 2016's international list.

      Reply
      • Chip Jones says

        October 29, 2015 at 3:03 pm

        Thank you Diane! I did not even know that Outlook 2016 was available. I've updated and am now happily blocking .eu!

  19. Mark Lewandoske says

    July 31, 2015 at 11:24 pm

    I have outlook 2013 and I do not have the option for words in the sender address. I deal with a lot of military and federal contacts. Not being able to place .mil and .gov emails into a folder is a real pain.

    Reply
    • Diane Poremsky says

      July 31, 2015 at 11:52 pm

      It should be there - it looks just like the first screenshot on the page.

      Reply
  20. mike Griff says

    February 15, 2015 at 2:04 am

    I need a way to do this in my Outlook 365 Cloud account so that i do not have to make the same rules for everything i get email on. Some items like smartphones do not have this capability and it would be extremely helpful to have the mail sorted in the exchange server before it ever goes out to all my devices. Is there a way to do this on the CLOUD copy of Outlook 365?

    Reply
    • Diane Poremsky says

      February 15, 2015 at 7:32 am

      rules you create in outlook on your desktop will be stored on the Exchange server but only server-side rules will run and unfortunately, the rules that check addresses are client-side.

      Reply
  21. Tim Haslett says

    May 2, 2014 at 11:56 am

    With 2013, how can I specify words for just the domain side of the sender's address? I keep getting spam emails from various domains in the .asia top level domain, but I do not want to exclude anyone that may use the word "asia" in their username portion (I know one person that does). Will including the "." in the specific words work in this case, as long as the username does not include the "." before "asia"?

    Reply
    • Diane Poremsky says

      May 2, 2014 at 12:07 pm

      Have you looked at junk mail options > international? You can block countries and character encoding (don't block ascii and Western European.)

      Reply
  22. Derek says

    September 6, 2013 at 6:55 am

    Diane,

    Could you please provide an example of using /ou with an internal child domain?

    Reply
    • Diane Poremsky says

      September 6, 2013 at 6:37 pm

      That should be all you need with Exchange server mailboxes. Use it in the address field. If you only want to filter one child domain, look at the x500 address and use the unique bits from it instead of the /ou - hopefully something is unique. /O=EXCHANGELABS/OU=EXCHANGE ADMINISTRATIVE GROUP (FYDIBOHF23SPDLT)/CN=RECIPIENTS/CN=diane
      Select a message from someone in that domain, then select the message and run this macro.
      Public Sub SendFromAddressOfCurrentEmail()
      Dim objItem As MailItem
      Set objItem = Application.ActiveExplorer.Selection.Item(1)
      Debug.Print objItem.SenderEmailAddress
      End Sub

      Reply
  23. Rick Sheeley says

    August 28, 2013 at 10:05 am

    Diane, please not this rule does not work for internal addresses AKA people in your own domain on same exchange server. This is a known issue, unaddressed by Microsoft.

    Reply
    • Diane Poremsky says

      August 28, 2013 at 1:04 pm

      Correct, it won't work for internal Exchange email, because internal email doesn't have a smtp address (mail sent by smartphones may have a smtp).

      Try /ou in the address field instead. (That works here.) Or use a rule that applies to all mail, except if contains an @.

      Reply
      • Danyelle says

        November 14, 2017 at 11:05 pm

        Could anyone help me please with Office 365 and/or Outlook 2011 for Mac? I need dummy examples here. I have tried many methods and none seem to work. I am applying the rules to filter email from colleagues of other campuses. I do not know if they are in the same exchange stmp or even how to know the difference. Our IT guy is stumped that using the contains words in the sender/receiver aren't working either. We have Sender / Receiver is or contains options. If we use "is" we have to select a person or a group. If we use "contains" we can add a string but whether including, excluding the @ or the .com or not does not make a difference. It does not work no matter what options we try. Can anyone please provide links with screen shots as needed or detailed instructions here. I have to find a way to set rules for an inbox that contains easily 1000 emails a day and many are important.

      • Diane Poremsky says

        November 14, 2017 at 11:38 pm

        did you try a rule for if address contains /ou? Try adding a rule in outlook on the web (OWA).

        I tested 2 rules in Outlook 2016 for Mac (I don't have a working 2011 install anymore) - the one for 'received from \ou' (marked with arrow) worked on mail from another account on my Exchange server. Words in the header did not.

    • Krishna says

      February 10, 2015 at 1:23 pm

      For internal mails, if you select the rule condition "Sender in Address book" and select the "Global address book", all mails from the current(own) domain will be filtered.

      Reply
      • Diane Poremsky says

        February 11, 2015 at 12:12 am

        This works with Exchange-only.

  24. Michael says

    March 1, 2013 at 9:19 am

    Very helpful Diane! I thought I knew "rules" pretty good, but you've saved me so much!!! Now I have ONE rule for all of my "weekly circular" e-mails to move them all into one folder, instead of a ton of individual rules.!

    Reply
  25. Alex says

    November 26, 2012 at 11:25 am

    Great, THANK YOU!!!

    Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Visit Slipstick Forums.
What's New at Slipstick.com

Latest EMO: Vol. 31 Issue 7

Subscribe to Exchange Messaging Outlook






Support Services

Do you need help setting up Outlook, moving your email to a new computer, migrating or configuring Office 365, or just need some one-on-one assistance?

Our Sponsors

CompanionLink
ReliefJet
  • Popular
  • Latest
  • Week Month All
  • Use Classic Outlook, not New Outlook
  • How to Remove the Primary Account from Outlook
  • Reset the New Outlook Profile
  • Disable "Always ask before opening" Dialog
  • This operation has been cancelled due to restrictions
  • Change Outlook's Programmatic Access Options
  • How to Hide or Delete Outlook's Default Folders
  • Use Public Folders In new Outlook
  • Removing Suggested Accounts in New Outlook
  • How to Delete Stuck Read Receipts
  • Sync Issues and Errors with Gmail and Yahoo accounts
  • Error Opening iCloud Appointments in Classic Outlook
  • Opt out of Microsoft 365 Companion Apps
  • Mail Templates in Outlook for Windows (and Web)
  • Urban legend: Microsoft Deletes Old Outlook.com Messages
  • Buttons in the New Message Notifications
  • Move Deleted Items to Another Folder Automatically
  • Open Outlook Templates using PowerShell
  • Count and List Folders in Classic Outlook
  • Google Workspace and Outlook with POP Mail
Ajax spinner

Recent Bugs List

Microsoft keeps a running list of issues affecting recently released updates at Fixes or workarounds for recent issues in classic Outlook (Windows).

For new Outlook for Windows: Fixes or workarounds for recent issues in new Outlook for Windows .

Outlook for Mac Recent issues: Fixes or workarounds for recent issues in Outlook for Mac

Outlook.com Recent issues: Fixes or workarounds for recent issues on Outlook.com

Office Update History

Update history for supported Office versions is at Update history for Office

Outlook Suggestions and Feedback

Outlook Feedback covers Outlook as an email client, including Outlook Android, iOS, Mac, and Windows clients, as well as the browser extension (PWA) and Outlook on the web.

Outlook (new) Feedback. Use this for feedback and suggestions for Outlook (new).

Use Outlook.com Feedback for suggestions or feedback about Outlook.com accounts.

Other Microsoft 365 applications and services




New Outlook Articles

Sync Issues and Errors with Gmail and Yahoo accounts

Error Opening iCloud Appointments in Classic Outlook

Opt out of Microsoft 365 Companion Apps

Mail Templates in Outlook for Windows (and Web)

Urban legend: Microsoft Deletes Old Outlook.com Messages

Buttons in the New Message Notifications

Move Deleted Items to Another Folder Automatically

Open Outlook Templates using PowerShell

Count and List Folders in Classic Outlook

Google Workspace and Outlook with POP Mail

Newest Code Samples

Open Outlook Templates using PowerShell

Count and List Folders in Classic Outlook

Insert Word Document into Email using VBA

Warn Before Deleting a Contact

Use PowerShell to Delete Attachments

Remove RE:, FWD:, and Other Prefixes from Subject Line

Change the Mailing Address Using PowerShell

Categorize @Mentioned Messages

Send an Email When You Open Outlook

Delete Old Calendar Events using VBA

Repair PST

Convert an OST to PST

Repair damaged PST file

Repair large PST File

Remove password from PST

Merge Two Data Files

Sync & Share Outlook Data

  • Share Calendar & Contacts
  • Synchronize two computers
  • Sync Calendar and Contacts Using Outlook.com
  • Sync Outlook & Android Devices
  • Sync Google Calendar with Outlook
  • Access Folders in Other Users Mailboxes

Diane Poremsky [Outlook MVP]

Make a donation

Mail Tools

Sending and Retrieval Tools

Mass Mail Tools

Compose Tools

Duplicate Remover Tools

Mail Tools for Outlook

Online Services

Calendar Tools

Schedule Management

Calendar Printing Tools

Calendar Reminder Tools

Calendar Dates & Data

Time and Billing Tools

Meeting Productivity Tools

Duplicate Remover Tools

Productivity

Productivity Tools

Automatic Message Processing Tools

Special Function Automatic Processing Tools

Housekeeping and Message Management

Task Tools

Project and Business Management Tools

Choosing the Folder to Save a Sent Message In

Run Rules on messages after reading

Help & Suggestions

Submit Outlook Feature Requests

Slipstick Support Services

Buy Microsoft 365 Office Software and Services

Visit Slipstick Forums.

What's New at Slipstick.com

Home | Outlook User | Exchange Administrator | Office 365 | Outlook.com | Outlook Developer
Outlook for Mac | Common Problems | Utilities & Addins | Tutorials
Outlook & iCloud Issues | Outlook Apps
EMO Archives | About Slipstick | Slipstick Forums
Submit New or Updated Outlook and Exchange Server Utilities

Send comments using our Feedback page
Copyright © 2026 Slipstick Systems. All rights reserved.
Slipstick Systems is not affiliated with Microsoft Corporation.