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.
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.
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.
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.