Skip to main content

Troubleshoot Web Search

If web search fails, first distinguish a failed search request from a failure to read the returned pages. This guide covers proxy settings, provider errors, empty content, timeouts, and models that do not call the search tool.

Common Web Search Issues​

1. Web Search Fails Behind HTTP Proxy​

If you're running Open WebUI behind an HTTP proxy, you might notice that web search queries succeed (e.g., SearXNG returns results), but the subsequent content fetching fails with errors like:

  • [Errno -3] Temporary failure in name resolution
  • Connection timeout to host
  • None of the web search results could be loaded

Proxy trust is on by default (WEB_SEARCH_TRUST_ENV), so on a default install this usually means Trust Proxy Environment was turned off and saved in Settings > Web Search (admin section), where the saved value wins over the variable. Every result URL is also resolved locally before it is fetched. Where only the proxy can resolve names, the log shows Could not resolve host, and you also need ENABLE_LOCAL_WEB_FETCH=True, which also allows fetching private network addresses.

Solution:

  1. Navigate to: Settings > Web Search (admin section)
  2. Enable Trust Proxy Environment
  3. Save changes

Alternatively, set the environment variable WEB_SEARCH_TRUST_ENV:

WEB_SEARCH_TRUST_ENV=True
info

This is a ConfigVar variable, meaning it can be set via environment variable on startup OR configured through the Admin Panel UI. Once set in the UI, the database value takes precedence over the environment variable.

This setting tells Open WebUI's web content loader to respect the proxy settings from your environment variables (http_proxy, https_proxy). Without this, even if your search engine works through the proxy, fetching content from the returned URLs will fail.


2. 403 Forbidden Errors from SearXNG​

If you're using SearXNG and seeing 403 Client Error: Forbidden in your logs, the JSON format is not enabled.

Solution:

Edit your SearXNG settings.yml and add json to the formats list:

search:
  formats:
    - html
    - json

Restart SearXNG after making this change.


3. Empty Content or Poor Results​

If web search returns empty content or poor quality results, the issue is often related to context window size or content extraction.

Solutions:

  • Increase context length: Web pages often contain 4,000-8,000+ tokens. If your model runs at Ollama's 4096-token default for GPUs under 24 GiB, you're missing most of the content. Increase to 16384+ tokens in Settings > Models > Edit (admin section) the model > Advanced Params (anything below will be subpar for web content).

  • Check result count: Adjust WEB_SEARCH_RESULT_COUNT to control how many results are fetched.

    In Native/Agentic tool calling, if the model omits count for search_web, Open WebUI uses WEB_SEARCH_RESULT_COUNT by default. If the model provides count, it is capped at the same admin-configured maximum.

  • Search pushes the prompt over the context limit. In Native mode, check whether the chat called fetch_url. The tool returns extracted page text and can send a long page in one result. In Settings > Web Search (admin section), set Fetch URL Content Length Limit to a positive value in characters, then retry in a new chat. Leave room for the conversation, other tool results, and the answer. The limit applies per fetch_url result.

    In Legacy mode, check Bypass Embedding and Retrieval in Settings > Web Search. With it on, loaded page text goes directly into the prompt. Turn it off to retrieve relevant chunks, or enable Bypass Web Loader to use search snippets. See the web search configuration reference.

  • Try different loaders: Configure WEB_LOADER_ENGINE to use playwright for JavaScript-heavy sites or firecrawl/tavily for better extraction.

  • Set a real User-Agent: If results from Wikipedia, Cloudflare-protected sites, or other large publishers come back empty (or as 403s in logs), the default Python requests/aiohttp UA is being filtered by bot detection. Set USER_AGENT to a real browser-like string (e.g. Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0 Safari/537.36). This affects web search result fetching, the fetch_url tool and web pages attached with #, including the check whether a link points to a file such as a PDF.

  • Results on your own network are skipped: a result URL that resolves to a private, loopback or other non-globally routable address is dropped before fetching, and the log shows Blocked non-global address: followed by the address. To search an intranet, set ENABLE_LOCAL_WEB_FETCH=True, which lets every user who can chat reach internal addresses through the server.

  • Compressed responses are refused: Open WebUI asks for uncompressed pages and files and refuses a compressed answer with The server answered with a compressed response, which is not accepted. A host that always sends a file compressed, such as an S3 or MinIO object uploaded with a Content-Encoding header, cannot be read. Upload the file again without that header.

For more details on context window issues, see the RAG Troubleshooting Guide.


4. Web Search Is Enabled but the Model Does Not Call search_web​

If the web search engine is configured (for example DDGS with DuckDuckGo as the backend), the model has Web Search enabled, and the per-chat Web Search toggle is on, but the assistant still answers without searching, the issue is usually model capability rather than the search provider.

In Native/Agentic mode, Open WebUI exposes web search as the search_web tool. The model must decide to call that tool and return a valid structured tool call. Older, smaller, or weaker local models can miss the tool, ignore it, or produce malformed tool calls even when every Open WebUI setting is correct.

Solutions:

  • Use a modern, high-quality tool-calling model for web-search workflows. Frontier models or large recent open-weight models are much more reliable than older/smaller models for deciding when to search and formatting tool calls correctly. See Tool Calling Modes: Native vs. Legacy for model requirements and recommendations.
  • Confirm Native Function Calling is active in Settings > Models > Edit (admin section) the model > Advanced Params > Function Calling. Built-in web search tools are Native-mode tools.
  • Switch the model to Legacy if it keeps answering without searching, for example with "I don't have real-time access". Set Function Calling to Legacy in the model's Advanced Params. In Legacy mode, Open WebUI runs the search itself before the model answers whenever the chat's Web Search toggle is on, with queries written by the task model, so the model does not have to decide to search. If the task model returns an empty query list, the search is skipped and the chat shows the status No search query generated. If Web Search Query Generation is off in Settings > Interface (admin section), or query generation fails, Open WebUI searches with your message as written. Legacy mode is unsupported and has no built-in tools, so fetch_url and the other Native tools are unavailable. See Tool Calling Modes.
  • Check all five web-search gates: Web Search is enabled globally, Web Search is enabled on the model, the model's Builtin Tools include the Web Search category, the Web Search toggle is enabled in the chat, and the user's group holds the features.web_search permission.
  • For DDGS/DuckDuckGo setups, verify the provider configuration separately using the DDGS provider guide, but switch models if DDGS returns results in logs while the assistant never calls search_web.

5. Connection Timeouts​

If web searches are timing out:

Solutions:

  • Reduce concurrent requests: Set WEB_SEARCH_CONCURRENT_REQUESTS=1 for sequential execution (recommended for the Brave free tier; the Brave client already retries once after a 429).

  • Adjust loader concurrency: Lower WEB_LOADER_CONCURRENT_REQUESTS if fetching many pages simultaneously.

  • Check network connectivity: Ensure Open WebUI can reach both the search engine and the result URLs.


6. SearXNG Returns No Results Without an Error​

SearXNG can answer a search with an empty result list, for example when the upstream engines it queries block the instance with CAPTCHAs or rate limits. Open WebUI reads only the results list from the SearXNG response, so it treats this as a search that found nothing, not as a SearXNG failure.

What you see depends on the Function Calling setting of the model:

  • Legacy: the web search status under the response shows No results found from web search, and the model answers without web content.
  • Native or Default: the search_web tool returns an empty list to the model. No error appears in the chat, and the model may say it found nothing.

Solutions:

  • Check the SearXNG log for engine errors such as CAPTCHAs, timeouts or access denials.
  • Run the same query in the SearXNG web interface to see whether any engine returns results.
  • Turn off the failing engines or enable others in SearXNG's settings.yml, then restart SearXNG.

Environment Variables Reference​

For a comprehensive list of all web search environment variables, see the Environment Configuration documentation.

Key variables:

VariableDescription
WEB_SEARCH_TRUST_ENVEnable proxy support for content fetching
WEB_SEARCH_RESULT_COUNTNumber of search results to fetch
WEB_SEARCH_CONCURRENT_REQUESTSConcurrent requests to search engine (the Concurrent Requests field beside Search Result Count; 0 means unlimited)
WEB_LOADER_CONCURRENT_REQUESTSConcurrent page fetches (the Concurrent Requests field in the Loader section; default 10)
WEB_LOADER_ENGINEContent extraction engine

All of these are persisted settings, so Settings > Web Search (admin section) is the live source of truth for them. The page fetcher reads proxy trust, loader concurrency and SSL verification from that saved configuration on each search, so a change you save there applies to the next search without a restart, and matches what the same settings do elsewhere. If a change you made in the admin panel appears not to have taken effect, re-check it there rather than assuming the environment variable is still in charge: the variable seeds the initial value, and the saved setting wins afterwards.

Web Search Engine is required only while Web Search is on, so the Loader settings save without one.

While Web Search is off, the page hides the settings that only apply to search. Their saved values are kept.


This content is for informational purposes only and does not constitute a warranty, guarantee, or contractual commitment. Open WebUI is provided "as is." See your license for applicable terms.