[BUG] WebFetch "Unable to verify domain is safe" error
Environment
- Platform (select one):
- Claude CLI version: 1.0.89 (Claude Code)
- Operating System: macOS (Darwin 24.6.0)
- Terminal: VS Code integrated terminal
Bug Description
WebFetch tool fails to access Microsoft Learn documentation URLs with "Unable to verify if domain is safe to
fetch" error. This appears to be a regression as the functionality worked previously. The issue affects deep URLs
while base domains work correctly.
Steps to Reproduce
- Open Claude Code in VS Code
- Use WebFetch tool with command: WebFetch(url: "https://learn.microsoft.com/en-us/semantic-kernel/concepts/plugi
ns/adding-mcp-plugins?pivots=programming-language-python", prompt: "Get documentation content")
- Observe the error response
Expected Behavior
WebFetch should successfully fetch and process content from Microsoft Learn documentation pages, as it did in
previous versions.
Actual Behavior
Error: Unable to verify if domain learn.microsoft.com is safe to fetch. This may be due to network restrictions or
enterprise security policies blocking claude.ai.
API Error (Request timed out.) · Retrying in 1 seconds… (attempt 1/10)
Full prompt:
read https://learn.microsoft.com/en-us/semantic-kernel/concepts/plugins/adding-mcp-plugins and make sure we are
following this pattern
⏺ I'll read the Microsoft documentation on MCP plugins in Semantic Kernel to ensure we're following the correct
pattern.
⏺ Fetch(https://learn.microsoft.com/en-us/semantic-kernel/concepts/plugins/adding-mcp-plugins)
⎿ Error: Unable to verify if domain learn.microsoft.com is safe to fetch. This may be due to network restrictions
or enterprise security policies blocking claude.ai.
⏺ Let me try a web search instead to find the Microsoft Semantic Kernel MCP plugin documentation.
⏺ Web Search("Microsoft Semantic Kernel MCP plugins adding pattern documentation 2024")
⎿ Did 0 searches in 360ms
Additional Context
Working URLs:
- ✅ https://www.google.com - Works consistently
- ✅ https://learn.microsoft.com (base domain) - Works
- ✅ https://github.com - Works initially but sometimes fails after repeated use
Failing URLs:
- ❌ https://learn.microsoft.com/en-us/semantic-kernel/... (deep URLs with paths)
- ❌ Some GitHub deep URLs after initial usage
Network Verification:
- Local network can access all URLs successfully via curl/browser
- Issue appears to be on Anthropic's infrastructure side, not user network
- Inconsistent behavior suggests rate limiting or domain filtering policies
Impact: This significantly reduces Claude Code effectiveness for searching web for development workflows and
documentation research tasks.
15 Comments
Found 3 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
using home wifi, not corporate.
The comment on https://github.com/anthropics/claude-code/issues/6188 indicates that the WebFetch tool is checking domains via:
We're using Claude Code via Google Vertex AI and the domain claude.ai is blocked by our firewall. This is what's preventing the WebFetch tool from working.
<img width="1837" height="115" alt="Image" src="https://github.com/user-attachments/assets/b245c044-719b-42a2-947e-33db9e6e0ec9" />
The domain check should be to a more generic endpoint. CloudFlare or OpenDNS? Something that is less likely to be blocked by enterprises.
For the time being, I'm having to tell Claude Code to curl the addresses which is far from ideal. Maybe I should make a local tool to bypass this issue.
Your customers are blocked because of this. Do now close this issue. Please address it.
Claude Code WebFetch Domain Validation Issue in Enterprise Environments
Problem Summary
Claude Code's WebFetch tool fails in enterprise environments with restrictive firewalls, even when target domains are accessible. The tool requires internet access to
claude.ai/api/web/domain_infofor domain validation, which is often blocked by corporate security policies.Technical Details
WebFetch Process Flow
https://claude.ai/api/web/domain_info?domain=<target_domain>{"domain":"<domain>","can_fetch":true}Failure Scenario
curl -I https://docs.gitlab.comworks)claude.aidomain restrictions)Error Message
Impact on Enterprise Users
Affected Functionality
Common Enterprise Scenarios
claude.aidomainCurrent Workarounds
1. Network-Level Solutions
claude.ai/api/web/domain_infospecifically2. Alternative Tools
curl -s <url>for simple HTML fetching3. Administrative Solutions
Proposed Solutions
Short-term Fixes
Long-term Solutions
Ideal Enterprise Features
Technical Implementation Suggestions
Option 1: Graceful Degradation
Option 2: Configuration-Based
Allow users to configure validation behavior:
Option 3: Proxy Detection
Automatically detect corporate proxy settings and route validation requests appropriately.
Business Case for Fix
User Experience Impact
Enterprise Adoption Barriers
Related Issues
Environment Details
---
Note: This issue affects legitimate business use cases where users need to research documentation, analyze code repositories, and access technical resources that are publicly available but cannot be reached due to the dependency on Anthropic's validation service.
As a workaround, you can use the
skipWebFetchPreflightflag to disable the security API call check.The skipWebFetchPreflight setting does not appear in their documentation @trionia ?
https://code.claude.com/docs/en/settings
@grantcarthew
The feature is not documented. I found it digging the sources. Also, it is mentioned in https://github.com/anthropics/claude-code/issues/6166#issuecomment-3207946059.
This happens for home networks too and is not limited to enterprise environments.
So there's zero solutions to this shit? Mine has been royally stopped and fucked for 2 days now, can't do anything and paying $108/month. Fix immediately.
Work around for me has been added the fetch MCP to my Claude code profile. Can't remember which I'm using probs https://mcpservers.org/servers/modelcontextprotocol/fetch
I built my own solution to get around this issue and it is far better. Extremely token efficient.
It's open source MPL2 license.
https://github.com/grantcarthew/snag
Intelligently fetch web page content using a browser engine.
This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.
I don't think it is fixed Mr Bot.
This workaround worked for me:
Add
skipWebFetchPreflightto your Claude Code settings file:~/.claude/settings.json:Still reproducing on v2.1.98 (macOS, direct API)
Environment:
Behavior:
The error is intermittent. In the same session:
WebFetch(url: "https://github.com/anthropics/claude-code/releases")→ failed withUnable to verify if domain github.com is safe to fetchgoogle.com,example.com,docs.anthropic.com) worked fine in the same sessionNetwork verification:
GitHub is fully reachable. The issue is in the preflight verification step, not network connectivity.
Possible v2.1.98 connection:
This release includes significant Bash tool permission hardening and security fixes (backslash-escaped flag bypass, compound command bypass,
/dev/tcpredirect checks, etc.). The tightened security layer may have changed or added stricter checks in the WebFetch preflight path, making the intermittent Cloudflare challenge issue more frequent.Workaround:
"skipWebFetchPreflight": truein~/.claude/settings.json(from a comment on this thread) — but this shouldn't be necessary for well-known domains like github.com.This issue is marked stale but clearly not resolved. Please re-triage.