# CLAUDE_CODE_PROXY_RESOLVES_HOSTS

> Set to 1, it lets the proxy look up host names.

**Field:** Artificial Intelligence  
**Category:** Claude Code  
**Also known as:** CLAUDE_CODE_PROXY_RESOLVES_HOSTS=1

## Think of it like

It is like you give the driver a street name. Then they find the house.

## Definition

CLAUDE_CODE_PROXY_RESOLVES_HOSTS set to 1 lets your proxy look up host names, not Claude Code. It is for networks where a computer cannot look up names on its own. Only the proxy can. Claude Code hands the name to the proxy, and the proxy finds the address.

## Example

Jack's lab network has no name lookup for the outside world. Only the proxy can find api.anthropic.com, so he sets this to 1.

## Example code

```bash
export HTTPS_PROXY=http://proxy.example.com:8080
export CLAUDE_CODE_PROXY_RESOLVES_HOSTS=1
claude
```

Let the proxy find api.anthropic.com.

## Why it matters

On a locked network, a request can fail at once if the computer must find the name.

## Common mistake

Setting it with no proxy. It only changes who looks up names when a proxy is used.

## Three principles

- **Proxy does the lookup.** Not Claude Code.
- **Locked networks.** No outside lookups.
- **Off by default.** Set 1 to use.

## Related terms

- [Domain Name System (DNS)](https://learn.benibix.com/term/infrastructure/dns)
- [CLAUDE_CODE_CERT_STORE](https://learn.benibix.com/term/ai/claude-code-cert-store-variable)

---

Source: https://learn.benibix.com/term/ai/claude-code-proxy-resolves-hosts-variable
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-16
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
