xref: /curl/docs/cmdline-opts/doh-url.md (revision cb829f99)
1---
2c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
3SPDX-License-Identifier: curl
4Long: doh-url
5Arg: <URL>
6Help: Resolve hostnames over DoH
7Added: 7.62.0
8Category: dns
9Multi: single
10See-also:
11  - doh-insecure
12Example:
13  - --doh-url https://doh.example $URL
14  - --doh-url https://doh.example --resolve doh.example:443:192.0.2.1 $URL
15---
16
17# `--doh-url`
18
19Specifies which DNS-over-HTTPS (DoH) server to use to resolve hostnames,
20instead of using the default name resolver mechanism. The URL must be HTTPS.
21
22Some SSL options that you set for your transfer also applies to DoH since the
23name lookups take place over SSL. However, the certificate verification
24settings are not inherited but are controlled separately via --doh-insecure
25and --doh-cert-status.
26
27By default, DoH is bypassed when initially looking up DNS records of the DoH server. You can specify the IP address(es) of the DoH server with --resolve to avoid this.
28
29This option is unset if an empty string "" is used as the URL.
30(Added in 7.85.0)
31