How to block a URL or domain in Zscaler ZIA

By Ashu Arun Sethi, Zscaler-certified (Zscaler ACE), HuCortex · Updated

For most cases, add the domain to a custom URL category, reference that category in a URL filtering rule with the action Block near the top of your policy, and activate the change. Use a leading dot (.example.com) to cover subdomains. For non-web protocols use DNS control, and for IP addresses use the cloud firewall.

Pick the right mechanism

MechanismBlocksBest for
Custom URL category + URL filtering ruleWeb traffic (HTTP and HTTPS) to matching hosts or pathsMost blocks. Easy to audit, easy to reverse, can be scoped to users or groups
DNS control ruleName resolution for the domain, whatever the protocolMalware call-home and non-web traffic, as long as DNS goes through Zscaler
Advanced Threat Protection malicious URL listURLs treated as known-maliciousConfirmed threat indicators you want handled as threats, not policy
Cloud firewall ruleIP addresses, optionally by port and protocolRaw IPs and non-web services

Block with a custom URL category

  1. Create a custom URL category for the blocks (one shared category is easier to manage than one per incident) and add the host.
  2. Create a URL filtering rule with the action Block that references the category, and place it above any rule that would allow the site. ZIA evaluates URL filtering rules in order and the first match wins.
  3. Activate the configuration. ZIA stages changes until activation.

URL entry syntax

EntryMatches
example.comOnly example.com itself
.example.comexample.com and every subdomain (www., login., ...)
example.com/pathThat path. On HTTPS sites this needs SSL inspection, because without it Zscaler only sees the host name

Why a blocked URL can still load

How Zmate does this from Slack

/zmate url-block <host> blocks the host for everyone, live as soon as a Zmate admin confirms. /zmate threats add and /zmate firewall block handle known-malicious URLs and IP addresses, and each has an undo. For a site you're unsure about, /zmate investigate-url checks it first and offers Block as a button.

See all Zmate commands

FAQ

Why is a URL I blocked in Zscaler still loading?
The most common causes: the change wasn't activated, an allow rule sits above your block rule, the entry doesn't match the host (example.com doesn't cover www.example.com; use .example.com for subdomains), you blocked a path on an HTTPS site without SSL inspection, or the traffic isn't going through Zscaler at all.
How do I block a domain and all its subdomains in Zscaler?
In a custom URL category, enter the domain with a leading dot, for example .example.com. That matches example.com and every subdomain. Without the dot, the entry matches only that exact host.
Do I need to activate changes in Zscaler ZIA?
Yes. ZIA policy changes are saved but not enforced until the configuration is activated. Every block, allow or category change needs an activation to take effect.