Skip to content
BENIBIX Learn

WebFetch Permission Rule

AI⌨️ Claude CodeConfiguration

Also known as WebFetch(domain:example.com), domain rule

A rule that says which web sites Claude may fetch.

Think of it like

It is like a list of the shops a child may walk to alone.

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.

Definition

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 code

json
{
  "permissions": {
    "allow": ["WebFetch(domain:docs.python.org)", "WebFetch(domain:*.github.com)"]
  }
}
Fetch docs and GitHub pages without a prompt.

Common mistake

Allowing only WebFetch and thinking the web is fenced. If Bash may run curl, Claude can still reach any site.

Key takeaways

  1. 1
    domain: and a host. One host each.
  2. 2
    *. for sub-sites. Not the host itself.
  3. 3
    curl is separate. Deny it too.

Compare