CURLOPT_NOPROXY matches destination hosts that should bypass the proxy. If the request URL uses internal.example, put that destination name in the bypass policy. Adding the proxy's own address answers a different question.

curl_setopt($handle, CURLOPT_NOPROXY, 'internal.example');

A URL using another hostname or a literal address can match differently. Follow libcurl's documented hostname, domain, address, and version-specific matching rules; do not assume the option performs a routing-table or arbitrary DNS-subnet check.

For an operation that should use no proxy at all, an explicit empty CURLOPT_PROXY is a clearer route choice. Keep that separate from a list of selective exceptions.

Neither option disables certificate verification. If the direct route produces a certificate error, investigate the destination identity and trust configuration rather than widening the bypass list until the symptom changes.

Artiglyn mynjee