curl/docs/cmdline-opts/proto-default.md
Daniel Stenberg ab3bb8cd8b
config2setopts: use default protocol properly
Verified by test 1724, 1725 and 2036

Closes #21983
2026-06-12 12:57:15 +02:00

813 B

c SPDX-License-Identifier Long Help Arg Added Category Multi See-also Example
Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al. curl proto-default Use PROTOCOL for any URL missing a scheme <protocol> 7.45.0 connection curl single
proto
proto-redir
--proto-default https ftp.example.com

--proto-default

Use protocol for any provided URL missing a scheme. The case-insensitive name should be given without any :// suffix.

An unknown or unsupported protocol causes error CURLE_UNSUPPORTED_PROTOCOL.

This option does not change the default proxy protocol (http).

Without this option set, curl guesses protocol based on the hostname, see --url for details.

The default protocol cannot be set to ipfs or ipns. Those schemes need to be used explicitly in the URL.