Ollama: "web fetch is only allowed for URLs provided by the user"
Last checked
The error
Error: web fetch is only allowed for URLs provided by the userShown in the Ollama desktop app when a model calls its web_fetch tool, often while searching with a cloud model.
"web fetch is only allowed for URLs provided by the user" means Ollama's desktop app blocked its web_fetch tool from opening a URL you didn't supply. The app only fetches links you pasted, or links from the model's own search results or fetched pages. Paste the exact URL into your message. If it ends in ")" or other punctuation, encode that character (%29 for ")"), because a known bug rejects such URLs even when you pasted them.
Why it happens
The Ollama desktop app only lets the web_fetch tool open URLs you put in the conversation, or links that came from its own search results or a page it already fetched. A URL the model guessed or rewrote is refused. A second, known cause: a URL whose real last character is ), ], }, !, a comma or a full stop is refused even when you pasted it, because the app trims that character before checking.
- The model invented or changed the URL. It tried to open a link you never gave it (for example a guessed page on a site it was searching), so the allowlist check fails.
- Your URL ends in punctuation. Ollama issue #18012 (August 2026) shows the app trims trailing ) ] } ! , . from a URL before adding it to the allowlist, then rejects the exact URL you pasted. Wikipedia links such as …/Go_(programming_language) hit this. A fix was proposed in pull request #18018, but it was closed without being merged.
The fix
- 1 Paste the exact URL you want read into your message, on its own, and ask the model to fetch that link.
- 2 If the URL ends in a bracket or other punctuation, encode the last character (%29 for ")", %5D for "]") or drop a trailing full stop that isn't part of the address, then paste it again.
- 3 If you want the model to find pages itself, ask it to search first: links from its own search results can be fetched.
- 4 Update the Ollama app, then retry.
Still failing?
- The search step fails instead, with "search API error (status 402)". That's an account limit on Ollama's web search, not this policy: see the 402 entry.
- The error says "failed to execute search request ... no such host". Your machine can't resolve ollama.com: check your DNS, VPN or firewall.
Related errors
Hit a different error?
Paste any agent error and get the cause and fix in seconds.
Frequently asked questions
Why does Ollama refuse a URL I clearly pasted?
If the URL ends in ), ], }, !, a comma or a full stop, the desktop app trims that character before allowlisting it and then rejects the exact URL you pasted (Ollama issue #18012). Encode the last character, for example %29 for ")", and paste it again.
Can I turn this check off?
There is no documented setting to turn it off in the desktop app. The check stops a model from fetching arbitrary pages you didn't ask for. Paste the links you want read, or let the model search first.
Does this happen with the Ollama API or other apps?
The message comes from the desktop app's web_fetch tool. Other apps that call Ollama models, such as OpenClaw or Open WebUI, use their own web tools and show their own errors.
Stop firefighting agent errors
Decoding errors one at a time is the manual version of what BetterClaw automates. Run your agents on a no-code AI agent platform with managed models, retries and config validation built in.
Free plan available · Pro $49/mo · BYOK · 7-day free trial
