xref: /curl/docs/cmdline-opts/url.md (revision 1056889f)
1---
2c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
3SPDX-License-Identifier: curl
4Long: url
5Arg: <url>
6Help: URL to work with
7Category: curl
8Added: 7.5
9Multi: append
10See-also:
11  - next
12  - config
13Example:
14  - --url $URL
15---
16
17# `--url`
18
19Specify a URL to fetch or send data to.
20
21If the given URL is missing a scheme (such as `http://` or `ftp://` etc) curl
22guesses which scheme to use based on the hostname. If the outermost subdomain
23name matches DICT, FTP, IMAP, LDAP, POP3 or SMTP case insensitively, then that
24protocol is used, otherwise it assumes HTTP. Scheme guessing can be avoided by
25providing a full URL including the scheme, or disabled by setting a default
26protocol, see --proto-default for details.
27
28To control where the contents of a retrieved URL is written instead of the
29default stdout, use the --output or the --remote-name options. When retrieving
30multiple URLs in a single invoke, each provided URL needs its own dedicated
31destination option unless --remote-name-all is used.
32
33On Windows, `file://` accesses can be converted to network accesses by the
34operating system.
35