← All articles
Microsoft Defender for Endpoint · Step-by-step guide

How to block websites and domains using Microsoft Defender for Endpoint custom indicators

Configure scoped domain and URL blocks, verify Network Protection and SmartScreen, troubleshoot enforcement and roll back safely.

Why this matters

When threat intelligence or an investigation identifies a malicious website, a security team may need to prevent managed endpoints from reaching it before more users encounter phishing, malware or fraudulent content. A block that exists only in the portal is not sufficient if endpoints or browsers do not enforce it.

This guide explains how to configure scoped Defender for Endpoint indicators, confirm the relevant protection settings, test enforcement safely and troubleshoot inconsistent results.

# How to block websites and domains using Microsoft Defender for Endpoint custom indicators

A website block can look correct in the Microsoft Defender portal and still fail on a laptop. The reason is often not the domain indicator itself: browser enforcement, Network Protection, device scope and HTTPS protocol behaviour all matter. This guide shows a safe way to configure a specific domain or URL indicator without confusing it with category-based Web Content Filtering.

This is a general implementation walkthrough based on previously discussed Defender website-blocking work. Example domains and outcomes are synthetic; the commands below have not been executed in the author's current environment.

What this control does

Microsoft Defender for Endpoint custom network indicators can allow, warn or block specified external IPs, URLs or domains. Microsoft Edge relies on SmartScreen for browser integration; other browsers and processes rely on Network Protection in block mode. This is distinct from Web Content Filtering, which controls website categories, and from DNS filtering, which may operate independently.

Prerequisites and permissions

The latest Microsoft prerequisites include supported platform and browser-specific exceptions; confirm the device OS before rollout.

Step 1 — Read current device protection state

On a Windows test endpoint, run these read-only commands in an authorised PowerShell session:

powershell
Get-MpComputerStatus |
  Select-Object AMRunningMode,AntivirusEnabled,RealTimeProtectionEnabled,
                BehaviorMonitorEnabled,IoavProtectionEnabled

Get-MpPreference |
  Select-Object EnableNetworkProtection,MAPSReporting,DisableBlockAtFirstSeen

Interpret EnableNetworkProtection carefully: 0 = disabled, 1 = block, 2 = audit. These checks are not sufficient to prove that Defender for Endpoint is onboarded or that cloud services are reachable. Also verify endpoint health and applied policies in the portal.

For a pilot managed by Intune, inspect the effective Endpoint security → Attack surface reduction → Network protection policy and assignment. Use the portal's current navigation if Microsoft renames a menu. Do not set conflicting GPO, Intune and local policies to different states.

Step 2 — Inspect tenant indicator configuration

In Microsoft Defender, open Settings → Endpoints → General → Advanced features and verify Custom network indicators. Next navigate to Settings → Endpoints → Indicators → URLs/Domains. Review existing entries, expiry, actions, device groups and conflicting allow entries before creating a new one.

Step 3 — Create a scoped block

Important: Microsoft's indicator precedence is Allow > Warn > Block for matching indicators. An allow entry may explain why a block appears ineffective. Microsoft notes indicator rollout can take up to 48 hours, though usually less than two hours; do not assume immediate propagation.

Step 4 — Validate with positive and negative tests

Use a test site you control and a pilot device. Confirm a baseline connection before enabling the block, then reattempt after policy propagation. Repeat in Edge and a non-Microsoft browser only if its Network Protection requirements are met.

TestEvidence to collectWhat it means
Controlled test FQDN before indicatorSite loads and timestampBaseline only
Same FQDN after propagationBrowser block page / endpoint notificationEnforcement for that browser/device
Unrelated approved FQDNStill loadsBasic negative control
Non-Microsoft browserBlock with Network Protection in block modeBrowser coverage, not universal HTTPS-path filtering
Device outside pilot groupNot subject to pilot indicatorScope check; other protections may still block it
Indicator expired or removedConnection retested after propagationRollback validation

Step 5 — Investigate why the block did not work

Check in order: device onboarding/health; indicator enablement; pilot group assignment; expiry; allow conflicts; SmartScreen (Edge); Network Protection block mode (other browsers); browser caching; propagation delay; and TLS/QUIC limitations.

For HTTPS in non-Microsoft browsers, a full URL path is not reliably enforceable by Network Protection: use an FQDN indicator where appropriate. QUIC and Encrypted ClientHello can prevent FQDN inspection; browser policy changes require their own approval and compatibility testing. HTTP/2 connection coalescing also has documented limitations.

A ConnectionSuccess event in network connection telemetry does not necessarily disprove Network Protection blocking: the TCP connection can succeed before the application-layer block decision. Inspect the protection-specific evidence and actual user experience.

Reusable advanced hunting query

Run in Defender XDR Advanced Hunting; adjust the lookback and test-device name. This is an exploratory pivot, not proof of blocking from a single event.

kusto
let device = "TEST-WIN11-01";
let lookback = 2d;
DeviceEvents
| where Timestamp > ago(lookback)
| where DeviceName =~ device
| where ActionType has_any ("NetworkProtection", "SmartScreen", "ExploitGuard")
| project Timestamp, DeviceName, ActionType, FileName,
          RemoteUrl, AdditionalFields
| order by Timestamp desc

Schema availability and event names vary by platform and sensor. Check ActionType reference and available events before interpreting zero results; correlate with the endpoint timeline and user-facing block.

Monitoring, limitations and rollback

Monitor block-related endpoint events, indicator expiry and service desk reports after rollout. Do not use a broad domain block to fix a narrowly scoped URL issue without assessing subdomains and business dependencies.

To roll back, locate the test indicator in Settings → Endpoints → Indicators → URLs/Domains, remove or change the specific indicator, and wait for policy propagation. If Network Protection was changed for the pilot, restore the previously recorded policy only through its authoritative management channel. Confirm the test domain's reachability and absence of unintended side effects. Do not disable tenant-wide web protection to undo one indicator.

References