Every time Claude Code wants to read a web page, it asks. For documentation sites you read every day, that gets old.
{
"permissions": {
"allow": [
"WebFetch(domain:docs.example.com)",
"WebFetch(domain:*.example.org)"
]
}
}
A domain: rule matches the host name of the URL Claude wants. docs.example.com matches only that host. *.example.org matches every subdomain at any depth, but not example.org itself, so add both if you need both. Matching ignores case.
The wildcard in other positions is careful on purpose: example.* matches example.org, but not example.evil.com, because the star never crosses a dot there.
Fetches to other sites still prompt, and answering “Yes, and don’t ask again” there remembers that domain for the repository.
Allowing a domain also means Claude reads whatever is on it without you seeing it first. A page can contain text written to steer an AI tool. For your own docs or an official reference that risk is small, for a forum or a site with user content it isn’t. I’d keep the list short and specific, and don’t reach for WebFetch(domain:*), which allows every site.
Further reading: WebFetch rules