With Office 365 Advanced Threat Protection (ATP), your organization can have a custom blocked URLs, such that when people click on web addresses (URLs) in email messages or certain Office documents, they are prevented from going to those URLs. Your organization can also have custom "do not rewrite" lists for specific groups in your organization. A "do not rewrite" list enables some people to visit URLs that are otherwise blocked by ATP Safe Links in Office 365.
This article describes how to specify a list of URLs that are excluded from ATP Safe Links scanning, and a few important points to keep in mind.
Note: The ATP Safe Links features are only available in Office 365 ATP, which is included in subscriptions, such as Office 365 Enterprise E5 and Office 365 Education A5, and, as of April 30, 2018, also Microsoft 365 Business. If your organization has an Office 365 subscription that does not include Office 365 ATP, you can potentially purchase ATP as an add-on. For more information, see Office 365 Advanced Threat Protection Service Description.
Important points to keep in mind
Any URLs that you specify in the "do not rewrite" list are excluded from ATP Safe Links scanning for the recipients that you specify.
When you specify a "do not rewrite" list for an ATP Safe Links policy, you can include up to three wildcard asterisks (*). Wildcards (*) are assumed for entries such as contoso.com, which do not explicitly include prefixes or subdomains, like http:// or https://. This means an entry, such as contoso.com is similar to *contoso.com* for your "do not rewrite" list.
The following table lists examples of what you can enter and what effect those entries have.
What It Does
Allows specific recipients to visit a domain, subdomains, and paths, such as http://www.contoso.com, https://www.contoso.com, https://maps.contoso.com, or http://www.contoso.com/a
Allows specific recipients to visit a site like http://contoso.com/a, but not subpaths like http://contoso.com/a/b
Allows specific recipients to visit a site like http://contoso.com/a and subpaths like http://contoso.com/a/b
If you already have a list of URLs in your "do not rewrite" list, make sure to review that list and add wildcards as appropriate. For example, if your existing list has an entry like http://contoso.com/a and you want to include subpaths like http://contoso.com/a/b in your policy, add a wildcard to your entry so it looks like http://contoso.com/a*.
Do not include a forward slash (/) in the URLs that you specify in your "do not rewrite" list. For example, rather than enter contoso.com/ in your "do not rewrite" list, enter contoso.com.
Set up a "do not rewrite" list for specific groups
ATP Safe Links protection uses several lists, including your organization's blocked URLs list and the "do not rewrite" lists for exceptions. You must have the necessary permissions assigned in the Office 365 Security & Compliance Center to set up your custom "do not rewrite" lists, and you do this when you add or edit Safe Links policies that apply to specific recipients in your organization.
Go to https://protection.office.com and sign in with your work or school account.
In the left navigation, under Threat management > Policy > Safe Links.
In the Policies that apply to specific recipients section, choose New (the New button resembles a plus sign (+)) to create a new policy. (Alternatively, you can edit an existing policy.)
Specify a name and description for your policy.
In the Do not rewrite the following URLs section, select the Enter a valid URL box, and then type a URL, and then choose the plus sign (+).
In the Applied To section, choose The recipient is a member of, and then choose the group(s) you want to include in your policy. Choose Add, and then choose OK.
When you are finished adding URLs, in the lower right corner of the screen, choose Save.
Note: Make sure to review your organization's custom list of blocked URLs. See Set up a custom blocked URLs list using ATP Safe Links.