# sandbox.network.allowedDomains

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

**Field:** Artificial Intelligence  
**Category:** Claude Code  
**Also known as:** allowedDomains

## Think of it like

It is like a list of friends' homes a child may walk to on their own.

## Definition

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.

## Example code

```json
{
  "sandbox": {
    "network": {
      "allowedDomains": ["github.com", "*.npmjs.org"]
    }
  }
}
```

Let commands reach GitHub and npm without a prompt.

## Why it matters

The hosts a project needs every day should not need a yes every time.

## Common mistake

Writing npmjs.org and expecting registry.npmjs.org to match. A subdomain needs the *. wildcard.

## Three principles

- **Reach without asking.** Listed hosts.
- **Wildcards for subdomains.** *.example.com.
- **Port optional.** :443.

## Related terms

- [sandbox.network.deniedDomains](https://learn.benibix.com/term/ai/sandbox-denied-domains-setting)
- [sandbox.network.httpProxyPort](https://learn.benibix.com/term/ai/sandbox-http-proxy-port-setting)
- [Permission Mode](https://learn.benibix.com/term/ai/permission-mode)

## Told apart from

- [allowedDomains vs WebFetch Permission Rule](https://learn.benibix.com/compare/sandbox-allowed-domains-setting-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.

![How the sandbox decides on a host a command wants to reach: the deny list first, then the allow list, then your permission mode.](https://learn.benibix.com/diagrams/sandbox-network-check.svg)

---

Source: https://learn.benibix.com/term/ai/sandbox-allowed-domains-setting
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-16
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
