xref: /curl/docs/cmdline-opts/url.md (revision 7628502d)
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.
20
21If the given URL is missing a scheme name (such as `http://` or `ftp://` etc)
22then curl makes a guess based on the host. If the outermost subdomain name
23matches DICT, FTP, IMAP, LDAP, POP3 or SMTP then that protocol is used,
24otherwise HTTP is used. Guessing can be avoided by providing a full URL
25including the scheme, or disabled by setting a default protocol, see
26--proto-default for details.
27
28To control where this URL is written, use the --output or the --remote-name
29options.
30
31**WARNING**: On Windows, particular `file://` accesses can be converted to
32network accesses by the operating system. Beware!
33