Skip to content
BENIBIX Learn

allowedDomains vs WebFetch Permission Rule

People think allowedDomains decides which pages Claude can fetch. It does not. It only covers shell commands in the sandbox, such as curl or npm. Claude's own fetch tool follows WebFetch rules instead. The link runs one way: a WebFetch domain allow rule is also added to the sandbox list, but the sandbox list never opens a fetch.

AI⌨️ Claude Code

sandbox.network.allowedDomains

A list of web hosts that commands in the sandbox may reach with no prompt.

sandbox.network.allowedDomains is a settings key. It lists the hosts that commands in the sandbox may reach with no prompt. A wildcard such as *.npmjs.org matches each subdomain. Adding :443 limits an entry to one port. Left unset, your permission mode decides what to do the first time a command reaches a new host.

Example
Emma's npm installs kept asking to reach the registry. She adds *.npmjs.org, and installs run without a prompt.
Why it matters
The hosts a project needs every day should not need a yes every time.
Full entry
AI⌨️ Claude Code

WebFetch Permission Rule

A rule that says which web sites Claude may fetch.

A WebFetch permission rule matches the web sites Claude may fetch. It is written as WebFetch(domain:) and a host name, such as WebFetch(domain:github.com). That host alone matches, so add *.github.com for its sub-sites. A bare WebFetch rule covers every site. It does not stop curl in the shell, so deny that too if it matters.

Example
Jack lets Claude read the Python docs without asking. Every other site still asks first.
Why it matters
A fetched page can carry hidden orders. Choosing the sites keeps that risk small.
Full entry

In one line

sandbox.network.allowedDomains
A list of web hosts that commands in the sandbox may reach with no prompt.
WebFetch Permission Rule
A rule that says which web sites Claude may fetch.