brewedbits.dev

Personal blog with guides and news on selfhosting, Linux and AI, from the Netherlands

nextDash nextdash --aboutYour bookmarks. Your terminal. checks your links knows your Docker host one container, no cloudLive demo →nextdash.cc ↗

Tip: allow WebFetch per domain so Claude Code reads your docs without asking

Claude
~/tips/tip-claude-webfetch-domain-allow

"permissions": {

Lets Claude fetch pages from chosen sites without a prompt and keeps asking for the rest.

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

More Claude tips /recap /focus /skill-doctor /autocompact 500k claude purge ~/work/my-repo --dry-run All Claude tips (83) All topics

Link