Go to the first, previous, next, last section, table of contents.

URL Format

URL is an acronym for Uniform Resource Locator. A uniform resource locator is a compact string representation for a resource available via the Internet. Wget recognizes the URL syntax as per RFC1738. This is the most widely used form (square brackets denote optional parts):


You can also encode your username and password within a URL:


Either user or password, or both, may be left out. If you leave out either the HTTP username or password, no authentication will be sent. If you leave out the FTP username, `anonymous' will be used. If you leave out the FTP password, your email address will be supplied as a default password.(1)

You can encode unsafe characters in a URL as `%xy', xy being the hexadecimal representation of the character's ASCII value. Some common unsafe characters include `%' (quoted as `%25'), `:' (quoted as `%3A'), and `@' (quoted as `%40'). Refer to RFC1738 for a comprehensive list of unsafe characters.

Wget also supports the type feature for FTP URLs. By default, FTP documents are retrieved in the binary mode (type `i'), which means that they are downloaded unchanged. Another useful mode is the `a' (ASCII) mode, which converts the line delimiters between the different operating systems, and is thus useful for text files. Here is an example:


Two alternative variants of URL specification are also supported, because of historical (hysterical?) reasons and their widespreaded use.

FTP-only syntax (supported by NcFTP):


HTTP-only syntax (introduced by Netscape):


These two alternative forms are deprecated, and may cease being supported in the future.

If you do not understand the difference between these notations, or do not know which one to use, just use the plain ordinary format you use with your favorite browser, like Lynx or Netscape.

Go to the first, previous, next, last section, table of contents.