curl / Mailing Lists / curl-users / Single Mail
Buy commercial curl support from WolfSSL. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder himself.

Confused about --doh/--resolve

From: Gisle Vanem via curl-users <>
Date: Tue, 11 Aug 2020 13:01:59 +0200

I'm confused about what a command like this does:
   curl --ipv4 --resolve \
     --doh-url \

First, I note curl connects to '' using IPv6
even though I specified '--ipv4' and added ''s
IPv4 address to this "fake" DNS-cache.

Adding a '-v', I see this confusing trace:
   * family0 == v6, family1 == v4
   * Trying 2606:4700::6810:f8f9:443...

'curl -M' says this:
   -4, --ipv4
       This option tells curl to resolve names to IPv4 addresses only,
       and not for example try IPv6.

I would expect that to be valid for a '--doh-url' too.

Now, it's like curl won't use this DNS-cache at all.
I don't get it.

Received on 2020-08-11