Components All New MacOS Windows Linux iOS
Examples Mac & Win Server Client Guides Statistic FMM Blog Deprecated Old


Provides the DNS-over-HTTPS URL.

Component Version macOS Windows Linux Server iOS SDK
CURL 8.5 ✅ Yes ✅ Yes ✅ Yes ✅ Yes ✅ Yes
MBS( "CURL.SetOptionDOHURL"; curl; Value )   More


Parameter Description Example
curl The CURL session handle. $curl
Value The new URL.


Returns OK or error.


Provides the DNS-over-HTTPS URL.
Pass in a string to a URL for the DOH server to use for name resolving. The parameter should be URL-encoded in the following format: "https://host:port/path". It MUST specify a HTTPS URL.

libcurl doesn't validate the syntax or use this variable until the transfer is issued. Even if you set a crazy value here, CURL.SetOptionDOHURL will still return OK.

curl sends POST requests to the given DNS-over-HTTPS URL.

To find the DOH server itself, which might be specified using a name, libcurl will use the default name lookup function. You can bootstrap that by providing the address for the DOH server with CURL.SetOptionResolve.

Disable DOH use again by setting this option to "".

See also DOH_URL option in CURL manual.

See also

Release notes

Blog Entries

Created 31st October 2018, last changed 31st October 2018

CURL.SetOptionDOHSSLVerifyStatus - CURL.SetOptionDefaultProtocol