Microsoft 365 Best Practices Library · Email, files and Teams
Safe Links policy design for Microsoft Defender for Office 365
Safe Links checks a web link at the moment someone clicks it, not only when the email arrives. That matters because a link can be harmless at delivery and turned into a phishing page an hour later. This guide explains how Safe Links works in email, Teams and Office apps, which policy really applies to each person, the values Microsoft recommends, and how to test the result.
Prefer to have it done for you? IT Perfection provides Microsoft 365 security hardening for companies in Irvine, Orange County and Los Angeles County.
Written by Ali Hassani, CISSP and C|CISO · 25+ years designing, securing and supporting business networks · Updated November 2026



Microsoft 365 Best Practices Library › Email, files and Teams › Safe Links policy design
Why it matters
A link can change after the email is delivered
Ordinary email filtering looks at a message once, when it arrives. If the link in it points to a clean page at that moment, the message is delivered. Attackers know this. A common method is to send the email first and switch the page behind the link to a fake sign-in screen afterwards.
Safe Links closes that gap. When it is fully switched on, the link is checked again every time someone clicks it. If the page is now known to be malicious, the person sees a warning page in place of the website.
Every tenant with at least one Defender for Office 365 license already gets some of this through the Built-in protection preset policy. Built-in protection is a sensible floor, but it is looser than Microsoft’s own recommended settings in three places: it lets users click through the warning, it does not rewrite links, and it does not cover messages sent inside the organization. The rest of this guide is about closing those three gaps on purpose, and knowing who is covered by what.
Where it works
Email, Teams and Office apps behave differently
One Safe Links policy covers three places where people click links. They do not work the same way, so each one needs its own test.
| Place | What Safe Links does | Good to know |
|---|---|---|
| Scans links before delivery. With rewriting on, each link is wrapped with a Microsoft address so every click is checked. | Only HTTP, HTTPS and FTP links. Not applied to rich text (RTF) messages, S/MIME signed messages or mail-enabled public folders. | |
| Microsoft Teams | Checks the link at the time of the click in chats, group chats, channels and tabs. Links are not rewritten. | Supported in the Teams desktop, web and mobile apps. A change to the Teams setting can take up to 24 hours. |
| Office apps | Checks links inside Word, Excel and PowerPoint documents when clicked. Links are not rewritten. | The user must be signed in with a work account and the apps must use modern authentication. |
Microsoft gives a plain example of the second point in its documentation: a company chooses not to rewrite links, a user opens the message in a mail app that does not support the Safe Links check, the link turns malicious after delivery, and the user is phished. For a small or mid-sized business with a mix of phones and mail apps, rewriting is the safer choice.
Which policy applies
Only one Safe Links policy applies to each person
This is the part that causes most surprises. A person can be named in several policies, but only the first one in the order below is applied. Processing stops there. Nothing is merged.
| Order | Policy | Who it applies to |
|---|---|---|
| 1 | Strict preset | The people you put in it. |
| 2 | Standard preset | Everyone you put in it who is not in Strict. |
| 3 | Evaluation policies | Only present during a Defender for Office 365 trial. |
| 4 | Custom policies | In priority order. A lower number wins. |
| 5 | Built-in protection | Applied last, to everyone not covered above. |
Two practical results follow. First, a carefully built custom policy does nothing for a user who is also in the Standard or Strict preset. Second, a “Do not rewrite” list lives inside one policy, so a user only gets the list from the policy that actually applies to them.
Before you start
What to have ready
- The right role. Security Administrator in Microsoft Entra is enough to create and change Safe Links policies. Global Administrator is not needed.
- Licenses confirmed. Every person who should be protected needs Defender for Office 365 Plan 1 or Plan 2.
- A list of current policies. Export the Safe Links page, and note who is in the Standard and Strict presets.
- Known internal tools that send links. Scanners, ticketing systems and line-of-business apps whose links must keep working.
- A pilot group. Five to ten people from different departments, including someone who uses a phone for most email.
- A person for reports of blocked links. Someone must be able to check a blocked link and submit it to Microsoft if it is clean.
Step by step
Design and apply Safe Links in seven steps
See what applies today
Microsoft Defender portal › Email & collaboration › Policies & rules › Threat policies › Safe Links
Open the Safe Links page. It lists every policy with its status and priority, in the order they are applied. Open each one and note who it applies to. Then open Preset security policies and note who is in Standard and Strict. Write the result as a simple table: person or group, policy that applies.
Decide between presets and a custom policy
For most companies the cleanest design is: all users in Standard, a few high-risk people in Strict, no custom Safe Links policies. Use a custom policy only where a group needs something different, and remember that the custom policy applies only to users who are not in a preset.
Set the email options
Microsoft Defender portal › Email & collaboration › Policies & rules › Threat policies › Safe Links › Create
In a custom policy, select the main email setting so links are checked and rewritten. Keep Apply Safe Links to email messages sent within the organization, Apply real-time URL scanning for suspicious links and links that point to files and Wait for URL scanning to complete before delivering the message selected. Clear Do not rewrite URLs, do checks via SafeLinks API only. Microsoft notes that this last option is selected by default in a new policy created in the portal, so look for it.
Illustration of the recommended selections in a custom Safe Links policy. Labels are shortened; this is not a screenshot.security.microsoft.com/safelinksv2IllustrationAnti-phishingAnti-spamAnti-malwareSafe AttachmentsSafe LinksQuarantineThreat policies › Safe Links › CreateURL and click protection settingsEmailOn: Safe Links checks links when users click links in emailApply Safe Links to email sent within the organizationApply real-time URL scanning for suspicious links and links to filesWait for URL scanning to complete before delivering the messageDo not rewrite URLs, do checks via SafeLinks API onlyTeams and Office 365 appsOn: Safe Links checks links in Microsoft TeamsOn: Safe Links checks links in Microsoft Office appsClick protection settingsTrack user clicksLet users click through to the original URLTurn on Teams and Office apps
Select the Teams setting and the Office 365 apps setting in the same policy. They are separate checkboxes, and a policy with only email selected leaves both uncovered for the people in it.
Set click protection
Keep Track user clicks selected so there is a record of who clicked what. Clear Let users click through to the original URL. With click-through allowed, the warning page has a “continue anyway” option, and a hurried person will use it. Optionally select the setting that shows your organization’s branding on warning pages, so staff can recognize a real warning.
Keep the exception list short
The Do not rewrite the following URLs list is for links that break when wrapped, such as some internal tools. Add only what has been tested and has an owner. Entries in this list are not scanned or wrapped during mail flow, so every entry is a small gap. See the section on exceptions below for the exact syntax.
Pilot, then apply to everyone
Apply the policy to the pilot group first. Allow up to 6 hours for a new or changed policy to apply. Run the tests in the “Check that it works” section, fix what breaks, then widen the policy or the preset to all recipients.
Recommended values
Settings at a glance
| Setting | Built-in protection | Standard and Strict | Recommended for a custom policy |
|---|---|---|---|
| Safe Links for email | On | On | On |
| Apply to email sent within the organization | Off | On | On |
| Real-time scanning of suspicious links and links to files | On | On | On |
| Wait for URL scanning before delivery | On | On | On |
| Do not rewrite URLs, check via API only | Selected | Not selected | Not selected |
| Safe Links for Teams | On | On | On |
| Safe Links for Office apps | On | On | On |
| Track user clicks | On | On | On |
| Let users click through to the original URL | Allowed | Not allowed | Not allowed |
| Do not rewrite the following URLs | Blank | Blank | Short, tested, owned |
Source: Microsoft Learn, Recommended email and collaboration threat policy settings and Preset security policies, checked November 22, 2026. Safe Links settings are identical in the Standard and Strict presets.
Exceptions
How the “Do not rewrite” list really behaves
This list is often misunderstood as an allow list. It is not. It only tells Safe Links not to wrap or scan those links in email during mail flow. A link on the list can still be blocked at the time of the click, and Teams and the Office web apps do not read the list at all.
| Entry | What it covers |
|---|---|
contoso.com | The site itself, but not subdomains or paths. |
*.contoso.com/* | The domain’s subdomains and their paths. Does not cover contoso.com on its own. |
contoso.com/* | Only contoso.com and its paths. |
https://contoso.com/a/* | That path and everything under it. |
- Leave out http:// and https:// when you want both versions excluded.
- Use two entries for a whole domain:
contoso.com/*and*.contoso.com/*. - Avoid loose wildcards such as
*contoso.com*. Microsoft warns that they also match look-alike addresses. - Up to three wildcards are allowed in one entry.
- For a link that is wrongly blocked, submit it to Microsoft as clean from the Submissions page and choose to allow it. That creates an entry in the Tenant Allow/Block List, which is the supported route.
Phishing simulations are a separate matter. If you use a third-party simulation service, Microsoft’s advanced delivery policy is the supported way to let those messages through. Do not use the “Do not rewrite” list or mail flow rules for that purpose.
Check that it works
How to confirm the result
- The test link is blocked. Email
http://spamlink.contoso.comto a pilot user. Microsoft provides this harmless address for testing. Clicking it should show a Safe Links warning page. - There is no way past the warning. On the warning page, there is no option to continue to the original address.
- Internal mail is covered. Send the same test link from one pilot user to another and repeat the click.
- Teams is covered. Post the test link in a Teams chat and click it. Allow up to 24 hours after turning the setting on.
- Office apps are covered. Put the test link in a Word document, open it signed in with a work account, and click it.
- A phone mail app is covered. Open the test email in the mail app the person normally uses on their phone.
- The policy list is as designed. The Safe Links page shows the expected policies, status and priority, with no forgotten test policy above them.
- Clicks are recorded. The threat protection status report and, with Plan 2, the URL click data in advanced hunting show the test clicks.
Mistakes and rollback
Common mistakes, and how to step back
- Treating Built-in protection as the finished design. It allows click-through, does not rewrite links and skips internal mail.
- Building a custom policy for users who are in a preset. The preset wins and the custom policy never applies to them.
- Testing email only. Teams and Office apps are separate settings and need their own test.
- Leaving click-through allowed. The warning becomes a suggestion.
- Using “Do not rewrite” as an allow list. It does not stop a block at the click, and Teams and Office web apps ignore it.
- Letting the exception list grow. Entries with no owner and no review date stay for years.
- Wrapping links with another product first. Microsoft notes that a service which wraps links before Defender for Office 365 can prevent Safe Links from processing them.
- Calling a change a failure too early. A policy change can take up to 6 hours, and the Teams setting up to 24 hours.
Rollback. A custom policy can be turned off from its details panel without deleting it, and the next policy in the order applies instead, ending with Built-in protection. A preset can have a person or group removed from it, or added as an exception. Before any change, export the policy list and note the current values, so the previous state can be put back exactly.
Keep it healthy
A light review routine
| When | What to do |
|---|---|
| When a user reports a blocked link | Check the link. If it is clean, submit it to Microsoft from the Submissions page. Do not add it to an exception list by reflex. |
| Monthly | Look at the threat protection status report for blocked clicks. Follow up with anyone who clicked a link that was later found malicious. |
| Quarterly | Review the “Do not rewrite” list: owner, reason, still needed. Confirm new staff and new shared mailboxes fall under the intended policy. |
| After any mail or security product change | Repeat the tests from the section above, including Teams and a phone. |
Keep a short written record: the date of each change, who is in Strict, each exception with its owner and reason, and the result of the last test. When something goes wrong, that record is what lets you answer “was this person protected, and by which policy?” in minutes. Click tracking stores which user clicked which link, so tell staff in your acceptable use policy that link clicks in work email are recorded for security.
Licenses
Which plan gives you what
| Plan | Safe Links | Notes |
|---|---|---|
| Exchange Online only, Microsoft 365 Business Basic or Standard | Not included | Add Defender for Office 365 Plan 1 as an add-on. |
| Microsoft 365 Business Premium | Included (Plan 1) | Policies, presets and reports. |
| Microsoft 365 E5 or Defender for Office 365 Plan 2 | Included | Adds advanced hunting, including the URL click events table, and Threat Explorer. |
License every person who should be protected, including owners of shared mailboxes. Check the current terms in the Defender for Office 365 service description before buying.
Have us do it
Prefer to hand this off?
IT Perfection designs and applies Safe Links for companies in Irvine, Orange County and Los Angeles County: a map of which policy applies to each person, the preset or custom policy with Microsoft’s recommended values, a short tested exception list, checks in email, Teams, Office apps and on phones, and a written record of the result. You receive a written scope and a written quote before any work starts.
Next in the library
Related guides
For a formal written audit of your Microsoft 365 tenant, including email protection, OC Security Audit, our related cybersecurity brand also led by Ali Hassani, does that work.

Who does the work
Written by Ali Hassani, CISSP, C|CISO
Ali Hassani has 25+ years of hands-on experience in IT operations, cybersecurity, Microsoft infrastructure, network security and Azure, and works with businesses in Irvine, Orange County and Los Angeles County. Design, implementation and troubleshooting work is planned and reviewed by Ali personally.
This guide is for education and planning. It does not replace a professional audit, compliance assessment or vendor engineering review. Updated November 2026.








FAQ
Safe Links: common questions
What is Safe Links in Microsoft 365?
Safe Links is a feature of Microsoft Defender for Office 365. It scans links in incoming email and checks links again at the moment a person clicks them in email, Microsoft Teams and supported Office apps. If the destination is known to be malicious, the person sees a warning page.
Is Safe Links on by default?
Partly. Tenants with at least one Defender for Office 365 license get the Built-in protection preset policy, which includes Safe Links. Built-in protection allows users to click through the warning, does not rewrite links and does not cover internal email. The Standard and Strict presets, or a custom policy with the recommended values, close those gaps.
Why do links in my email start with safelinks.protection.outlook.com?
That is Safe Links rewriting. The original link is wrapped with a Microsoft address so that each click is checked first. In most views of the message the person still sees the original address when hovering over the link.
Does the “Do not rewrite the following URLs” list allow a link?
No. It only stops Safe Links from wrapping or scanning the link in email during mail flow. The link can still be blocked at the time of the click, and Microsoft Teams and Office web apps do not use the list. To allow a clean link everywhere, submit it to Microsoft and add it to the Tenant Allow/Block List.
Should users be allowed to click through a Safe Links warning?
Microsoft’s recommended value in the Standard and Strict presets is not to allow it. If a link is wrongly blocked, the better route is for the user to report it and for an administrator to check and submit it.
How long does a Safe Links policy change take?
Microsoft says to allow up to 6 hours for a new or updated policy to be applied. Turning Safe Links protection for Teams on or off can take up to 24 hours.
Which license includes Safe Links?
Defender for Office 365 Plan 1 or Plan 2. Plan 1 is included in Microsoft 365 Business Premium and Plan 2 in Microsoft 365 E5. Both can be added to other plans.
Need this done for your business?
IT Perfection plans, installs and supports this for companies in Irvine and Orange County
The guides explain the steps. If you would rather have it done, planned and documented by an experienced engineer, these are the services that cover it. Design, implementation and troubleshooting work is planned and reviewed by Ali Hassani personally.
Microsoft 365 managed services
Exchange, Teams, SharePoint and OneDrive run and secured for you.
View serviceMicrosoft 365 migration and setup
Mail, calendars and files moved with a tested plan, secured from day one.
View service