OmniscioGuidesPermission rulesWebFetch domains
Claude Code WebFetch permissions: allow by domain
The WebFetch tool reads a page and returns an answer about it. If you fetch the same few documentation sites every day, three allow rules remove the prompt without opening every host on the internet.
Checked on November 27, 2026 against the Claude Code 2.1.332 documentation. By the Omniscio team. Updated .
The block
{
"permissions": {
"allow": [
"WebFetch(domain:code.claude.com)",
"WebFetch(domain:docs.github.com)",
"WebFetch(domain:developer.mozilla.org)"
]
}
}Each entry is the tool name and a specifier in parentheses. The three rules approve a fetch from those three hosts without a prompt. A fetch anywhere else keeps whatever behavior the permission mode already gives it, which in Manual mode is a prompt unless the host is on Claude Code's preapproved documentation list.
Add the rules to ~/.claude/settings.json for every project, or to a project's .claude/settings.json so the team shares them. The user and project lists merge rather than replace one another.
What a domain rule matches
| Rule | Matches | Does not match |
|---|---|---|
WebFetch(domain:example.com) | example.com | api.example.com, because a subdomain is another host |
WebFetch(domain:*.example.com) | api.example.com, a.b.example.com | example.com itself |
WebFetch(domain:example.*) | example.org | example.evil.com, because the wildcard cannot cross a dot |
WebFetch(domain:*) | Every domain | Nothing |
Matching is case-insensitive, and a trailing dot is stripped from both sides, so example.com. and example.com are the same host. Wildcards in WebFetch rules need Claude Code v2.1.172 or later to match fetches.
The leading *. is the one wildcard form that crosses a dot, and it matches subdomains at any depth while leaving the apex out. Anywhere else in a domain rule the * stands in for text between two dots, which is why example.* covers example.org but not example.evil.com. Anthropic explains the difference as a guard against a host an attacker could register.
Allow every fetch, or refuse every fetch
A bare WebFetch rule and WebFetch(domain:*) both cover every URL, and they change different parts of the system. The difference matters when the sandbox, Claude Code's operating-system isolation for shell commands, is on.
| Rule | In allow | In deny |
|---|---|---|
WebFetch | Fetches without a prompt. Does not change which hosts sandboxed commands reach | Removes the WebFetch tool, so Claude cannot fetch. Does not change the sandbox list |
WebFetch(domain:*) | Fetches without a prompt, and sandboxed commands can reach any host | Keeps the tool and refuses each fetch, and sandboxed commands cannot reach any host |
To refuse one host while leaving the rest as they are, put that host in the deny list. Because deny is checked first, the rule wins over an allow rule for the same domain.
{
"permissions": {
"deny": ["WebFetch(domain:example.com)"]
}
}Deny rules are evaluated first, so you cannot use an ask rule to mean "ask for the rest". An ask rule on WebFetch(domain:*) prompts before every fetch, including one that an allow rule also names. Where you want a narrower net, allow the hosts you use, deny the hosts you know are wrong, and let the mode handle the others.
The two forms also differ on Artifact reads, the pages the Artifact tool publishes on claude.ai. A bare WebFetch deny or ask rule does not apply to an Artifact read, while a domain: rule covering claude.ai or the *.claudeusercontent.com content host does.
The fetch a domain rule does not stop
A WebFetch rule is about the WebFetch tool. Claude can also reach the network through Bash, with curl, wget or a script that opens a socket, and those calls are governed by Bash rules instead. Allowing every fetch for WebFetch does not allow shell network commands, and the reverse is also true.
Anthropic's own advice for a URL restriction is a combination. Deny the shell network commands, allow the domains on WebFetch, and add the sandbox network allowlist when the restriction has to hold. A Bash deny rule does not match the same program reached by its full path or inside sh -c, so the sandbox is the part that closes those forms.
Where the block goes
User settings at ~/.claude/settings.json apply in every project on the machine. A project's .claude/settings.json is committed and reaches everyone who works in the repository, and .claude/settings.local.json is yours in that project alone.
Allow rules in a project file wait for the workspace trust dialog for that folder. Ask and deny rules apply at once, because they only restrict. A claude -p or SDK session never shows the dialog, so a project's allow rules do not apply there unless the folder was trusted before.
For one session, --allowedTools "WebFetch(domain:code.claude.com)" adds the allow rule from the command line, and --disallowedTools adds a deny rule. A deny rule in a settings file still outranks a tool the flag names as allowed.
Confirm it took effect
- Run
/permissionsand check that the three allow rules are listed, with the settings file that supplied each one. - Ask Claude to fetch a page on an allowed host. No prompt.
- Ask it to fetch a page on a host you did not name. The prompt, or the mode's own behavior.
- If a rule does not appear, run
claude doctor, which lists the settings entries Claude Code rejected.
A rule added or removed while Claude is working applies from Claude's next tool call in the same turn. Claude Code reloads a saved settings file, so a restart is not needed.
The mistakes that make a domain rule misfire
- Expecting a subdomain to be covered.
domain:example.comleavesapi.example.comout. Name both forms when you fetch both. - Adding an ask rule for everything. An ask rule beats an allow rule, so
WebFetch(domain:*)in the ask list turns every fetch back into a prompt. - Treating the rule as a network boundary. The shell can still fetch. The sandbox network allowlist is the enforcement Anthropic points to.
- Forgetting the trust step. A project's allow rules do nothing until the folder is trusted, and never apply in a
-prun that never showed the dialog.
The other new pages
Each page carries a complete block, not a fragment. The hub lists all ten.
Where Omniscio fits
Omniscio is a desktop app for running several Claude Code agents side by side in one window. The permission rules on this page are Claude Code's own and work the same inside an Omniscio session, because each session runs Claude Code.
Where these answers come from
- Configure permissions, for the rule syntax, the evaluation order, the WebFetch domain rules, the bare form and the shell gap. Read November 27, 2026.
- Settings reference, for the permission keys and the settings scopes.
- CLI reference, for
--allowedToolsand--disallowedTools. - The changelog, release 2.1.332, dated November 25, 2026.
Common questions
Does WebFetch(domain:example.com) cover api.example.com?
No. A domain rule matches the hostname exactly, so example.com and api.example.com are two hosts. Add WebFetch(domain:*.example.com) for the subdomains, and keep the bare domain rule if you also fetch the apex.
Can I allow a few domains and ask for every other fetch?
No, because ask rules are checked before allow rules and the first match decides. An ask rule on WebFetch(domain:*) prompts for every fetch, including the domains you allowed. The default (Manual) mode asks before a fetch to a host Claude Code does not preapprove, and the built-in auto mode sends the fetch to its classifier instead of prompting, so an allow list is enough for the sites you use every day.
Do WebFetch rules stop Claude from using curl?
No. A WebFetch rule governs the WebFetch tool, and a Bash command such as curl or wget is a different tool with its own rules. Anthropic's guidance is to deny the shell network commands and allow the domains on WebFetch, then use the sandbox network allowlist when the restriction has to hold.
What is the difference between WebFetch and WebFetch(domain:*)?
Both cover every URL, and they differ in the sandbox and on Artifact reads. As a deny rule, a bare WebFetch removes the tool from Claude's context, while WebFetch(domain:*) keeps the tool and refuses each fetch and also blocks every host for sandboxed commands.